{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eOnce upon a time in the Kingdom of Far Far Away lived Sir Lancelot, the chief Royal General. He was very proud of his men and he liked to invite the King to come and watch drill exercises which demonstrated the fighting techniques and tactics of the squad he was in charge of. But time went by and one day Sir Lancelot had a major argument with the Fairy Godmother (there were rumors that the argument occurred after the general spoke badly of the Godmother\u0027s flying techniques. That seemed to hurt the Fairy Godmother very deeply). \u003c/p\u003e\u003cp\u003eAs the result of the argument, the Godmother put a rather strange curse upon the general. It sounded all complicated and quite harmless: \"\u003cspan class\u003d\"tex-font-style-underline\"\u003eIf the squared distance between some two soldiers equals to \u003cspan class\u003d\"tex-span\"\u003e5\u003c/span\u003e, then those soldiers will conflict with each other!\u003c/span\u003e\"\u003c/p\u003e\u003cp\u003eThe drill exercises are held on a rectangular \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e × \u003ci\u003em\u003c/i\u003e\u003c/span\u003e field, split into \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003enm\u003c/i\u003e\u003c/span\u003e square \u003cspan class\u003d\"tex-span\"\u003e1 × 1\u003c/span\u003e segments for each soldier. Thus, the square of the distance between the soldiers that stand on squares \u003cspan class\u003d\"tex-span\"\u003e(\u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e)\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e(\u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e)\u003c/span\u003e equals exactly \u003cspan class\u003d\"tex-span\"\u003e(\u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e - \u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e)\u003csup class\u003d\"upper-index\"\u003e2\u003c/sup\u003e + (\u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e - \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e)\u003csup class\u003d\"upper-index\"\u003e2\u003c/sup\u003e\u003c/span\u003e. Now not all \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003enm\u003c/i\u003e\u003c/span\u003e squad soldiers can participate in the drill exercises as it was before the Fairy Godmother\u0027s curse. Unless, of course, the general wants the soldiers to fight with each other or even worse... For example, if he puts a soldier in the square \u003cspan class\u003d\"tex-span\"\u003e(2, 2)\u003c/span\u003e, then he cannot put soldiers in the squares \u003cspan class\u003d\"tex-span\"\u003e(1, 4)\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e(3, 4)\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e(4, 1)\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e(4, 3)\u003c/span\u003e — each of them will conflict with the soldier in the square \u003cspan class\u003d\"tex-span\"\u003e(2, 2)\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eYour task is to help the general. You are given the size of the drill exercise field. You are asked to calculate the maximum number of soldiers that can be simultaneously positioned on this field, so that no two soldiers fall under the Fairy Godmother\u0027s curse.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe single line contains space-separated integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003en\u003c/i\u003e, \u003ci\u003em\u003c/i\u003e ≤ 1000\u003c/span\u003e) that represent the size of the drill exercise field.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint the desired maximum number of warriors.\u003c/p\u003e"}},{"title":"Examples","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\u003e2 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e3 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first sample test Sir Lancelot can place his 4 soldiers on the \u003cspan class\u003d\"tex-span\"\u003e2 × 4\u003c/span\u003e court as follows (the soldiers\u0027 locations are marked with gray circles on the scheme):\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/f86b680f7121aa2dce25039e5b79f5b2?v\u003d1725531791\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/center\u003e\u003cp\u003eIn the second sample test he can place 6 soldiers on the \u003cspan class\u003d\"tex-span\"\u003e3 × 4\u003c/span\u003e site in the following manner:\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/c3afaff0d4a6ed60bbc1730bb35bd941?v\u003d1725531791\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/center\u003e"}}]}