Arkady buy air ticket city a city c unfortunately direct flight lot flight a city B B CThere n flight a b depart time moment a_1 a_2 a_3 a_n arrive B t_a moment laterthere m flight b c depart time moment b_1 b_2 b_3 b_m arrive C t_b moment laterthe connection time negligible use ith flight A B jth flight B C b_j ge a_i t_ayou cancel k flight if cancel flight Arkady use itArkady want C early possible want c late possible Find early time Arkady arrive C optimally cancel k flight if cancel k flight way possible reach C print 1