24 atcoder#ABC227A. [ABC227A] Last Card
[ABC227A] Last Card
Score : points
Problem Statement
We will hand out a total of cards to people numbered .
Beginning with Person , we will give the cards one by one to the people in this order: . Who will get the last card?
Formally, after Person gets a card, Person will get a card. After Person gets a card, Person gets a card.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print a number representing the person who will get the last card.
3 3 2
1
The cards are given to Person in this order.
1 100 1
1
3 14 2
3