a,b=map(int,input().split())
t1=[1,3,5,7,8,10,12]
t2=[4,6,9,11]
for i in t1:
if b==i:
print("31")
for i in t2:
if b==i:
print("30")
if b==2:
if (a%4==0 and a%100!=0) or a%400==0:
print("29")
else:
print("28")
04-06
749
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)