{"raw_statement":[{"iden":"problem statement","content":"There was a contest with $N$ problems. The $i$\\-th $(1\\leq i\\leq N)$ problem was worth $A_i$ points.\nSnuke took part in this contest and solved $M$ problems: the $B_1$\\-th, $B_2$\\-th, $\\ldots$, and $B_M$\\-th ones. Find his total score.\nHere, the total score is defined as the sum of the points for the problems he solved."},{"iden":"constraints","content":"*   $1\\leq M \\leq N \\leq 100$\n*   $1\\leq A_i \\leq 100$\n*   $1\\leq B_1 < B_2 < \\ldots < B_M \\leq N$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$\n$A_1$ $A_2$ $\\dots$ $A_N$\n$B_1$ $B_2$ $\\dots$ $B_M$"},{"iden":"sample input 1","content":"3 2\n10 20 30\n1 3"},{"iden":"sample output 1","content":"40\n\nSnuke solved the $1$\\-st and $3$\\-rd problems, which are worth $10$ and $30$ points, respectively. Thus, the total score is $10+30=40$ points."},{"iden":"sample input 2","content":"4 1\n1 1 1 100\n4"},{"iden":"sample output 2","content":"100"},{"iden":"sample input 3","content":"8 4\n22 75 26 45 72 81 47 29\n4 6 7 8"},{"iden":"sample output 3","content":"202"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}