#CCBCHBAHAI0000153. Tổng điểm học sinh (Students Marks Sum)
Tổng điểm học sinh (Students Marks Sum)
Students Marks Sum
Source: HackerRank
Version: Phuoc Hung OJ Extended
Problem Statement
You are given marks for students.
- Even indices are boys' marks.
- Odd indices are girls' marks.
A character selects the required group:
b: sum the marks at even indices;g: sum the marks at odd indices.
Compute the requested sum.
Input
- The first line contains an integer .
- Each of the next lines contains one integer .
- The final line contains
borg.
Output
Print one integer: the requested sum of marks.
Subtasks
Subtask 1 (100 points): ; ; .
Examples
Input
5
1
2
3
4
5
g
Output
6
Explanation
For g, we add odd-indexed elements: .