#include void main(){ int year,month,a[12]={31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%d%d",&year,&month); if(year%400==0||(year%4==0&&year%100!=0)) a[1]=29; printf("%d\n",a[month-1]); }