Number of Airplanes in the Sky(LintCode 391):

Problem