{"raw_statement":[{"iden":"problem statement","content":"You are given $N$ positive integers $a_1, a_2, ..., a_N$.\nFor a non-negative integer $m$, let $f(m) = (m\\ mod\\ a_1) + (m\\ mod\\ a_2) + ... + (m\\ mod\\ a_N)$.\nHere, $X\\ mod\\ Y$ denotes the remainder of the division of $X$ by $Y$.\nFind the maximum value of $f$."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $2 \\leq N \\leq 3000$\n*   $2 \\leq a_i \\leq 10^5$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$a_1$ $a_2$ $...$ $a_N$"},{"iden":"sample input 1","content":"3\n3 4 6"},{"iden":"sample output 1","content":"10\n\n$f(11) = (11\\ mod\\ 3) + (11\\ mod\\ 4) + (11\\ mod\\ 6) = 10$ is the maximum value of $f$."},{"iden":"sample input 2","content":"5\n7 46 11 20 11"},{"iden":"sample output 2","content":"90"},{"iden":"sample input 3","content":"7\n994 518 941 851 647 2 581"},{"iden":"sample output 3","content":"4527"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}