{"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":"PLAIN","content":"在菜鸡浩的故乡,苟若村,有一个神秘的仪式。\n\n在这个仪式上,村民会拿出自家的宝石,摆成一个 n 正多边形的法阵来召唤\n\n出更多的爆米花用来举办派对。\n\n但是其中有其他村的间谍混入,他们偷偷放了假的宝石在里面,使得法阵的力量被削弱了\n\n那么村名们就没有足够的爆米花吃了。\n\n所以请你帮忙想想,在去掉某些宝石的同时,要求法阵依旧是正多边形的情况下(点数不得小于3),\n\n法阵的最大力量 (为剩余的宝石力量的和)\n\n\n"}},{"title":"Input","value":{"format":"PLAIN","content":"输入 \n第一行 n (3 \u003c\u003d n \u003c\u003d 20000)\n第二行 n 个数字, 一次表示该位置宝石的力量\n\n宝石的力量在 [-1000, 1000]"}},{"title":"Output","value":{"format":"PLAIN","content":"输出\n第一行 法阵的最大力量"}},{"title":"Examples","value":{"format":"PLAIN","content":"样例\ninput\n6\n2 2 2 2 2 2\noutput\n12\n\ninput\n6\n-1 -1 -1 2 -1 2\noutput\n3"}},{"title":"Note","value":{"format":"PLAIN","content":""}}]}