P27938 [洛谷] [Language Month Competition 202408] Met in 2016
普及-
题目描述

Problem Background

Dedicated to the farewell.

Wind, the night of July 27, 2024

Problem Description

Wind and Qing were once very good friends. Qing once said, "…we might not make it to the end, but friendship can last a lifetime." Wind also believed this. However, promises in words are always so powerless.

Wind and Qing met in August 2016. August 2016 was their first month of knowing each other, September 2016 was their second month...

Time flies, and now it is already the year $x$ and month $y$. Please determine which month this is in their friendship.

Input Format

Input consists of a single line with two integers $x, y$.

Output Format

Output a single integer on a line, representing the month number in their friendship.

Sample Input and Output

Sample Input #1

2016 8

Sample Output #1

1

Sample Input #2

2024 7

Sample Output #2

96

Notes

For $20\%$ of the test cases, $x = 2016$;
For another $20\%$ of the test cases, $y = 8$;
For $100\%$ of the test cases, $2016 \le x \le 9999$, $1 \le y \le 12$. Specifically, if $x = 2016$, then $y \ge 8$ is guaranteed.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2016 8
样例输出
1