If a 4-meter flagpole casts a shadow of 6 meters at the same time that a nearby building casts a 24-meter shadow, how tall is the building?