#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
if(b%2==1 && b!=7)
{
printf("30");
}
else if(b%2==0 && b!=2)
{
printf("31");
}
else if(b==2)
{
if(a%400==0)
{
printf("28");
}
else if(a%4==0 && a%100!=0)
{
printf("28");
}
else
printf("29");
}
else if(b==7)
{
printf("31");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: