a=[31,29,31,30,31,30,31,31,30,31,30,31] #存储闰年每个月份的天数 n=int(input()) if 1<=n<=12: print(a[n-1]) else: print("Invalid.")