{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eA tunnel with square profile consists of (\u003cstrong\u003en\u003c/strong\u003e-\u003cstrong\u003e1\u003c/strong\u003e) sections. Floor in each section is flat and can go up or down along the section. Coordinates \\[\u003cstrong\u003ex_1\u003c/strong\u003e, \u003cstrong\u003ey_1\u003c/strong\u003e \\], \\[\u003cstrong\u003ex_2\u003c/strong\u003e , \u003cstrong\u003ey_2\u003c/strong\u003e \\], ..., \\[\u003cstrong\u003ex_n\u003c/strong\u003e , \u003cstrong\u003ey_n\u003c/strong\u003e \\] where \u003cstrong\u003ex_1\u003c/strong\u003e \u003c \u003cstrong\u003ex_2\u003c/strong\u003e \u003c ... \u003c \u003cstrong\u003ex_n\u003c/strong\u003e describe points where tunnel’s floor starts, ends, or one section joins other. Ceiling of the tunnel is \u003cstrong\u003e1\u003c/strong\u003e meter above the floor and corresponding sections’ join points are at coordinates \\[\u003cstrong\u003ex_i\u003c/strong\u003e, \u003cstrong\u003ey_i\u003c/strong\u003e + \u003cstrong\u003e1\u003c/strong\u003e\\].\u003c/p\u003e\n\n\u003cp\u003eLaser beam is directed to the tunnel from its start. To facilitate beam transition through the tunnel light translators could be installed at section boundaries. These translators can retransmit laser emission in necessary direction, moreover retransmitted beam not necessarily starts at the point where coming beam hit the translator.\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src\u003d\"https://static.e-olymp.com/content/84/844c68e4efffacd080981cdc74e691c04574099e.jpg\" /\u003e\u003c/p\u003e\n\n\u003cp\u003eAs soon as light translators could be installed at sections boundaries only, their coordinates can only be \u003cstrong\u003ex_1\u003c/strong\u003e , \u003cstrong\u003ex_2\u003c/strong\u003e , ..., \u003cstrong\u003ex_n\u003c/strong\u003e . Your task is to determine the minimal number of light translators necessary to allow bean transition through the tunnel.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src\u003d\"file:///C:/Temp/moz-screenshot-10.png\" /\u003e\u003c/p\u003e\n\n\u003cp\u003eThe first line at input contains integer \u003cstrong\u003eN\u003c/strong\u003e (\u003cstrong\u003e2\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e ≤ \u003cstrong\u003e1000\u003c/strong\u003e). Following \u003cstrong\u003eN\u003c/strong\u003e lines contain \u003cstrong\u003e2\u003c/strong\u003e floats each -- coordinates \u003cstrong\u003ex_i\u003c/strong\u003e and \u003cstrong\u003ey_i\u003c/strong\u003e (\u003cstrong\u003e-10000\u003c/strong\u003e ≤ \u003cstrong\u003ex_i\u003c/strong\u003e, \u003cstrong\u003ey_i\u003c/strong\u003e ≤ \u003cstrong\u003e10000\u003c/strong\u003e).\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eThe only line at output should contain one integer -- the minimal number of light translators necessary.\u003c/p\u003e\n\n"}},{"title":"Example","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n1 1\n2 1\n3 2\n4 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}