EasyRating 900
Calendar Columns
A calendar shows a month in columns, one column per week (Monday to Sunday). Given the month (1–12, not a leap year) and the weekday of the 1st (1 = Monday … 7 = Sunday), how many columns are needed?
Input
Two integers m and d.
Output
One integer.
Sample 1
Input
1 7
Output
6
Sample 2
Input
1 1
Output
5
Output appears here