#abc290a. [abc290_a]Contest Result
[abc290_a]Contest Result
Problem Statement
There was a contest with problems. The -th problem was worth points.
Snuke took part in this contest and solved problems: the -th, -th, , and -th ones. Find his total score.
Here, the total score is defined as the sum of the points for the problems he solved.
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
3 2
10 20 30
1 3
Sample Output 1
40
Snuke solved the -st and -rd problems, which are worth and points, respectively. Thus, the total score is points.
Sample Input 2
4 1
1 1 1 100
4
Sample Output 2
100
Sample Input 3
8 4
22 75 26 45 72 81 47 29
4 6 7 8
Sample Output 3
202