Day of Year
Given a Gregorian year Y and a 1-indexed day-of-year d, determine which month (1–12) the day belongs to.
Use the leap-year rule: a year is leap if it is divisible by 400, or divisible by 4 but not by 100.
The input is guaranteed valid:
- $Y \ge 1$;
dis within1..365for a common year and1..366for a leap year.
Input
One line with two integers: Y d.
Output
One line with a single integer: the month number (1–12) that contains day d of year Y.
Sample
Input
2025 322
Output
11
Explanation: 2025 is not a leap year; day 322 is Nov 18.
