P27258 [AtCoder] Hour Hand
普及+
题目描述

Problem Description

Aoi, a student at JOI High School, has obtained an analog clock. This clock has 12 marks along its outer edge, numbered clockwise from 1 to 12.

The hour hand of this clock rotates clockwise, moving one mark per hour.

Right now, the hour hand is pointing at a certain mark. The number of this mark is \( A \).

Output the number of the mark the hour hand will be pointing at after exactly \( B \) hours have passed.

Input Format

The input is given from the standard input in the following format:

\( A \) \( B \)

Output Format

Output the number of the mark the hour hand will be pointing at after exactly \( B \) hours have passed from when it was pointing at \( A \).

Sample Input and Output

Sample Input #1

9 5

Sample Output #1

2

Sample Input #2

4 20

Sample Output #2

12

Notes/Hints

Constraints

  • \( 1 \leq A \leq 12 \).
  • \( 1 \leq B \leq 100 \).
  • All input values are integers.

Sample Explanation 1

Starting from the hour hand pointing at 9, the hour hand changes as follows:
- After exactly 1 hour, the hour hand points at 10.
- After exactly 2 hours, the hour hand points at 11.
- After exactly 3 hours, the hour hand points at 12.
- After exactly 4 hours, the hour hand points at 1.
- After exactly 5 hours, the hour hand points at 2.
Therefore, output 2.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
9 5
样例输出
2