{"trustable":false,"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\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e Li \u003cspan\u003eLaoshi’s\u003c/span\u003e home is having a Christmas party now. Since the party is running into highlight, he was given by his mother with a square-shape cake with \u003cem\u003ew \u003c/em\u003egram and \u003cspan\u003e2\u003cem\u003en\u003c/em\u003e\u003c/span\u003e plates, each plate is for one of Li \u003cspan\u003eLaoshi\u0027s\u003c/span\u003e friends. The \u003cspan\u003e\u003cem\u003e\u003cspan\u003ei\u003c/span\u003e\u003c/em\u003e-thplate\u003c/span\u003e can hold at most \u003cspan\u003e\u003cem\u003ea\u003c/em\u003e\u003c/span\u003e\u003cem\u003e\u003csub\u003ei\u003c/sub\u003e\u003c/em\u003egram of cake.\u003c/p\u003e \n\u003cp\u003e It turned out that among Li \u003cspan\u003eLaoshi\u0027s\u003c/span\u003e friends there are \u003cem\u003en\u003c/em\u003e boys and \u003cem\u003en\u003c/em\u003e girls. To please everyone, Li \u003cspan\u003eLaoshi\u003c/span\u003e decided to serve the cake as follows:\u003c/p\u003e \n\u003cp\u003e ·Li \u003cspan\u003eLaoshi\u003c/span\u003e handout the same weight of cake to each girl;\u003c/p\u003e \n\u003cp\u003e ·Li \u003cspan\u003eLaoshi\u003c/span\u003e handout the same weight of cake to each boy;\u003c/p\u003e \n\u003cp\u003e ·if each girl gets \u003cem\u003ex\u003c/em\u003e gram of cake, then each boy gets \u003cspan\u003e2\u003cem\u003ex\u003c/em\u003e\u003c/span\u003e gram of cake.\u003c/p\u003e \n\u003cp\u003e In the other words, each boy should get two times more cake than each girl does.\u003c/p\u003e \n\u003cp\u003e Li \u003cspan\u003eLaoshi\u003c/span\u003e wants to maximize the total amount of the cake that he hands out to his friends. Let’s help him and determine the optimum distribution of plates between Li \u003cspan\u003eLaoshi\u0027s\u003c/span\u003e friends.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e The first line of the input contains two integers, \u003cem\u003en\u003c/em\u003e and \u003cem\u003ew\u003c/em\u003e (1 ≤ \u003cem\u003en\u003c/em\u003e ≤ 10\u003csup\u003e5\u003c/sup\u003e, 1 ≤ \u003cem\u003ew\u003c/em\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e)\u0026nbsp;—the number of Li \u003cspan\u003eLaoshi\u0027s\u003c/span\u003e friends that are boys (equal to the number of Li\u0027s friends that are girls) and the weight of Li\u0027s cake in gram.\u003c/p\u003e \n\u003cp\u003e The second line of the input contains the sequence of integers \u003cem\u003e\u003cspan\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/span\u003e\u003c/em\u003e (1 ≤ \u003cem\u003e\u003cspan\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/span\u003e\u003c/em\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e, 1 ≤ \u003cem\u003ei\u003c/em\u003e ≤ \u003cspan\u003e2\u003cem\u003en\u003c/em\u003e\u003c/span\u003e)\u0026nbsp;—\u0026nbsp;the capacities of Li\u0027s plates in gram.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e Print a single real number —the maximum total amount of cake in weight that Li can hand out to his friends without violating the given conditions. Your answer will be considered correct if its absolute or relative error doesn\u0027t exceed 10\u003csup\u003e -\u003c/sup\u003e\u003csup\u003e 6\u003c/sup\u003e.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp\u003e \u003c/p\u003e \n\u003cdiv\u003e \n \u003cp\u003e Input\u003c/p\u003e \n \u003cp\u003e 2 4\u003cbr\u003e 1 1 1 1\u003c/p\u003e \n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cp\u003e Output\u003c/p\u003e \n \u003cp\u003e 3\u003c/p\u003e \n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cp\u003e Input\u003c/p\u003e \n \u003cp\u003e 3 18\u003cbr\u003e 4 4 4 2 2 2\u003c/p\u003e \n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cp\u003e Output\u003c/p\u003e \n \u003cp\u003e 18\u003c/p\u003e \n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cp\u003e Input\u003c/p\u003e \n \u003cp\u003e 1 5\u003cbr\u003e 2 3\u003c/p\u003e \n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cp\u003e Output\u003c/p\u003e \n \u003cp\u003e 4.5\u003c/p\u003e \n\u003c/div\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cbr\u003e"}}]}