{"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 Sherlock is trying to open a rather challenging lock. The lock has \u003ci\u003en\u003c/i\u003e buttons on it and to open it, you should press the buttons in a certain order to open the lock. When you push some button, it either stays pressed into the lock (that means that you\u0027ve guessed correctly and pushed the button that goes next in the sequence), or all pressed buttons return to the initial position. When all buttons are pressed into the lock at once, the lock opens.\u003c/p\u003e \n\u003cp\u003e Consider an example with three buttons. Let\u0027s say that the opening sequence is: {2, 3, 1}. If you first press buttons 1 or 3, the buttons gets unpressed immediately. If you first press button 2, it stays pressed. If you press 1 after 2, all buttons return to the unpressed state. If you press 3 after 2, buttons 3 and 2 stay pressed. As soon as you\u0027ve got two pressed buttons, you only need to press button 1 to open the lock.\u003c/p\u003e \n\u003cp\u003e Sherlock doesn\u0027t know the opening sequence. But he is really smart and he is going to act in the optimal way. Calculate the number of times he\u0027s got to push a button in order to open the lock in the worst-case scenario.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e A single line contains integer \u003ci\u003en\u003c/i\u003e (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 2000) — the number of buttons the lock has.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e In a single line print the number of times Sherlock has to push a button in the worst-case scenario.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp\u003e Input\u003c/p\u003e \n\u003cp\u003e 2\u003c/p\u003e \n\u003cp\u003e Output\u003c/p\u003e \n\u003cp\u003e 3\u003c/p\u003e \n\u003cp\u003e Input\u003c/p\u003e \n\u003cp\u003e 3\u003c/p\u003e \n\u003cp\u003e Output\u003c/p\u003e \n\u003cp\u003e 7\u003c/p\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cbr /\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cp\u003e Consider the first test sample. Sherlock can fail his first push and push the wrong button. In this case he will already be able to guess the right one with his second push. And his third push will push the second right button. Thus, in the worst-case scenario he will only need 3 pushes.\u003c/p\u003e"}}]}