P15319 [VKOSHP 2025] Mathematical Calendar

Description

Lusya attends a programming club on Thursdays and a mathematics club that meets on Mondays. For New Year, students who excel in their clubs were given a beautiful pocket calendar as a gift. Lusya received one as well. Lusya loves to look for different patterns. After studying the calendar, she discovered that in the new year, the number of winter Thursdays is $2$ more than the number of winter Mondays. Lusya realized that if she knows this condition about the year, as well as the fact that the new year will not be a leap year, she can uniquely determine the day of the week for any given day and month. Lusya solved this problem and offers you to solve it as well. Let us remind you that the winter months are December, January, and February. January, March, May, July, August, October, and December have 31 days, April, June, September, and November have 30 days, and February has 28 days in a non-leap year.

Input Format

The input consists of a single line containing a string --- a date in the format $\texttt{DD-MM}$.

Output Format

Output an integer from $1$ to $7$ --- the day of the week that corresponds to the given date, 1 being Monday and 7 being Sunday.