Today is W通博娛樂城高手攻略ednesday, the third day of the eek Whats more interesting is that tomorro is the last day of t通博娛樂城登入流程he year 2024
(資料圖片)
Limak is a little polar bear He enjoyed this year a lot No, he is so eager to the ing year 2024
Limak ants to prove ho通博娛樂城週年優惠 responsible a bear he is He is going to regularly save candies for the entire year 2024! He consers various saving plans He can save one candy either on some fixed day of the eek or on some fixed day of the month
Limak chose one particular plan He isnt sure ho many candies he ill save in the 2024 ith his plan Please, calculate it and tell him
Input
The only of the input is in one of the folloing to formats
x of eek here x (1 ≤ x ≤ 7) denotes the day of the eek The 1-st day is Monday and the 7-th one is Sunday
x of month here x (1 ≤ x ≤ 31) denotes the day of the month
Output
Print one integer — the number of candies Limak ill save in the year 2024
Examples
input
Copy
4 of eek
output
52
input
Copy
30 of month
output
11
Note
Polar bears use the Gregorian calendar It is the most mon calendar and you likely use it too You can read about it on Wikipedia if you ant to – ikiGregorian_calendar The eek starts ith Monday
In the first sample Limak ants to save one candy on each Thursday (the 4-th day of the eek) T通博娛樂城註冊失敗here are 52 Thursdays in the 2024 Thus, he ill save 52 candies in total
In the second sample Limak ants to save one candy on the 30-th day of each month There is the 30-th day in exactly 11 months in the 2024 — all months but February It means that Limak ill save 11 candies in total
——————通博娛樂城體驗金條件依次判斷即可;