{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eKogan-sensei continues teaching young Gennosuke Fujiki the art of sword fighting. Kogan fixes a thin bamboo stem of length \u003ci\u003el\u003c/i\u003e horizontally on \u003ci\u003en\u003c/i\u003e props and orders Gennosuke to cut it into two pieces. Kogan says that a samurai\u0027s sword must be as sharp and the stroke must be as fast that both pieces of the stem don\u0027t move after the stroke.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eGennosuke has noticed that not only samurai mastery is important but also the place where the sword cuts the stem. If the center of mass of a stem piece is not located between two props, the piece will fall. Gennosuke wants to paint some parts of the bamboo stem white so that if he cuts the stem at a white point at least one of the resulting pieces will fall. Help him calculate the total length of the stem parts he will have to paint.\r\n\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains the integers \u003ci\u003el\u003c/i\u003e and \u003ci\u003en\u003c/i\u003e (3 ≤ \u003ci\u003el\u003c/i\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e;\r\n2 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10\u003csup\u003e5\u003c/sup\u003e). In the second line you are given \u003ci\u003en\u003c/i\u003e integers smaller than \u003ci\u003el\u003c/i\u003e. They are the distances from the left end of the bamboo stem to the supporting props given in the ascending order. It is guaranteed that the initial position of the stem is stable.\r\n\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput the total length of segments of the stem that Gennosuke should paint white. The answer should be rounded up to the nearest integer.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","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\u003e5 4\r\n1 2 3 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}