Let's designate the days of the week as numbers from 1 (Monday) to 7 (Sunday), respectively. According to the well-known m — the day of the week on the first day of the current month — determine the day of the week of n.
It is forbidden to use any algorithmic constructs (if, while, for, etc.) except for arithmetic operations div>
Input
The program receives 2 integers 1 ≤ n≤ 31.1≤ m ≤ 7, each on a separate line.
Imprint
Output the day of the week of the number n.
Examples
# |
Input |
Output |
1 |
8
1 |
1 |
2 |
7
7 |
6 |
Запрещенные операторы:if;for;while;?;max;min