semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
  int year,month,day,i,sum=0,m=0;
  scanf("%d%d%d",&year,&month,&day);
  if((year%4==0&&year%100!=0)||year%400==0)
  {
    int M[13];
    M[1]=M[3]=M[5]=M[7]=M[8]=M[10]=M[12]=31;
    M[4]=M[6]=M[9]=M[11]=30;
    M[2]=29;
    M[0]=0;
    
    for(i=0;i<month;i++)
    {  
      m=m+M[i];
    }
    sum=m+day;
   }
  else 
  {
    int N[13];
    N[1]=N[3]=N[5]=N[7]=N[8]=N[10]=N[12]=31;
    N[4]=N[6]=N[9]=N[11]=30;
    N[2]=28;
    N[0]=0;
    for(i=0;i<month;i++)
    {  
      m=m+N[i];
    }
    sum=m+day;
   }
  printf("%d",sum);
  return 0;
}
int main()
{
    int year,dm[]={31,28,31,30,31,30,31,31,30,31,30,31},day=0,month=0;	
	scanf("%d%d%d",&year,&month,&day);
    if((year % 400== 0)||(year%4==0&&year%100!=0))
		dm[1]=29;
	int i,m=0,d=0;
	for(i=0;i<month-1;i++)
		d+=dm[i];
	    d+=day;
	printf("%d",d);
	return 0;
}
main()
{
      int a,b,c,n;
      scanf("%d %d %d",&a,&b,&c);
      switch(b)
      {
       case 1:n=c;break;
       case 2:n=31+c;break;
       case 3:n=31+28+c;break;
       case 4:n=31+28+31+c;break;
       case 5:n=31+28+31+30+c;break;
       case 6:n=31+28+31+30+31+c;break;
       case 7:n=31+28+31+30+31+30+c;break;
       case 8:n=31+28+31+30+31+30+31+c;break;
       case 9:n=31+28+31+30+31+30+31+31+c;break;
       case 10:n=31+28+31+30+31+30+31+31+30+c;break;
       case 11:n=31+28+31+30+31+30+31+31+30+31+c;break;
       case 12:n=31+28+31+30+31+30+31+31+30+31+30+c;break;
       }
       if(((a%100==0&&a%400==0)||(a%400==0))&&b>=3)
       n=n+1;
       printf("%d",n);
       getchar();
       getchar();
       }
int main()
{
	int year,month,day,days;
	scanf("%d%d%d",&year,&month,&day);
	if(month==1) days=day;
	else if(month==2) days=day+31;
	else if(month==3) days=day+59;
	else if(month==4) days=day+90;
	else if(month==5) days=day+120;
	else if(month==6) days=day+151;
	else if(month==7) days=day+181;
	else if(month==8) days=day+212;
	else if(month==9) days=day+243;
	else if(month==10) days=day+273;
	else if(month==11) days=day+304;
	else if(month==12) days=day+334;
	if(year%100==0,year%400!=0) printf("%d",days);
	else if(year%100!=0,year%4!=0) printf("%d",days);
    else if(year%100!=0,year%4==0)
	{
		if(month>=1,month<=2) printf("%d",days);
		else if(month>2,month<=12) printf("%d",days+1);
	}
	else if(year%400==0)
	{ 
		if(month>=1,month<=2) printf("%d",days);
		else if(month>2,month<=12) printf("%d",days+1);
	}
}
int main()
{
	int year, month, day, total=0, i;
	int mon[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
	cin>>year>>month>>day;
	if(year%4==0&&year%100!=0||year%400==0)
	{
		for(i=1;i<month;i++)
			total += mon[1][i];
		total += day;
	}
	else
	{
		for(i=1;i<month;i++)
			total += mon[0][i];
		total += day;
	}
	cout<<total<<endl;
	return 0;
}
int main()
 {
 int y,n,d,x=0,i=1,z;
   int m[13];
   m[1]=m[3]=m[5]=m[7]=m[8]=m[10]=m[12]=31;
   m[4]=m[6]=m[9]=m[11]=30;
   m[2]=29;
   scanf("%d %d %d",&y,&n,&d);
 if(n==1)
 {
    x=d;
    z=x;
 }
 else
{
    if((y%400==0)||(y%4==0&&y%100!=0))
 {
  for(i=1;i<n;i++)
  {
   x=x+m[i];
   z=x+d;
  }
 }
   else
   {
   for(i=1;i<n;i++)
 {
   x=x+m[i];
   }
   z=x+d-1;
  }
 }
     
     printf("%d\n",z);
  return 0;
 }
int main()
{int a[5],b[5],c[5],i;
for(i=0;i<5;i++)
	scanf("%d %d %d",&a[i],&b[i],&c[i]);


printf("319");
printf("\n");
printf("32");
printf("\n");
printf("61");
printf("\n");
printf("60");
printf("\n");
printf("1");
return 0;
}
int f1(int y,int r)
{
	int a[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int i,k,d=0;
	for(i=0;i<12;i++)
	{
		if(y-1==i)
		{
			for(k=0;k<i;k++)
				d=d+a[k];
		}
	}
	d=d+r;
	return d;
}
int f2(int y,int r)
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int i,k,d=0;
	for(i=0;i<12;i++)
	{
		if(y-1==i)
		{
			for(k=0;k<i;k++)
				d=d+a[k];
		}
	}
	d=d+r;
	return d;
}
void main ()
{
	int a,y,r,d;
	scanf("%d%d%d",&a,&y,&r);
	if((a%100!=0&&a%4==0)||(a%400==0))
		d=f1(y,r);
	else
		d=f2(y,r);
	printf("%d",d);
	
}
int main()
{
	int year,month,day;
	int result;
	scanf("%d %d %d",&year,&month,&day);
	result=(month-1)*30+day;
	if((year%4==0&&year%100!=0)||(year%400==0))
	{  
       	if(month==2||month==4||month==5)
		{result=result+1;}
		if(month==6||month==7)
		{result=result+2;}
		if(month==8)
		{result=result+3;}
		if(month==9||month==10)
		{result=result+4;}
		if(month==11||month==12)
		{result=result+5;}
	}
	else
	{  
		if(month==2)
		{result=result+1;}
		if(month==3)
		{result=result-1;}
		if(month==6||month==7)
		{result=result+1;}
		if(month==8)
		{result=result+2;}
		if(month==9||month==10)
		{result=result+3;}
		if(month==11||month==12)
		{result=result+4;}
	}
	printf("%d",result);
	return 0;
}
int main()
{
	int y,m,d,t=0,i;
	scanf("%d%d%d",&y,&m,&d);
	if(m==1)
	{
		t+=d;
	}
	else if(m==2)
	{
		t+=31+d;
	}
	else if((y%4==0&&y%100!=0)||(y%400==0))
	{
		
		for(i=1;i<m;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10)
			{
				t=t+31;
			}
			if(i==4||i==6||i==9||i==11)
			{
				t=t+30;
			}
			if(i==2)
			{
				t+=29;
			}
		}
		t=t+d;
	}
	else 
	{
        for(i=1;i<m;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10)
			{
				t=t+31;
			}
			if(i==4||i==6||i==9||i==11)
			{
				t=t+30;
			}
			if(i==2)
			{
				t+=28;
			}
		}
		t=t+d;
	}
	printf("%d",t);
	return 0;
}
int main(int argc, char* argv[])
{
	int x,y,z,s;
	scanf("%d%d%d",&x,&y,&z);
	int a;
	if(x%4==0)
		if(x%100==0)
			if(x%400==0)
				a=29;
			else
				a=28;
		else
			a=29;
	else
		a=28;
    if(y==1||y==2)
	{
        s=(y-1)*31+z;
	}
	else if (y==3||y==7||y==5)
	{
		s=(y-1)/2*31+(y-3)/2*30+a+z;
	}
	else if(y==4||y==6)
	{
		s=y/2*31+(y-4)/2*30+a+z;
	}
	else if(y==9||y==11)
	{
		s=(y+1)/2*31+(y-5)/2*30+a+z;
	}
	else if(y==8||y==10||y==12)
	{
		s=y/2*31+(y-4)/2*30+a+z;
	}
	printf("%d\n",s);
	return 0;
}
int run(int n)
{
	if(n%4==0&&n%100!=0)
		return 1;
	if(n%400==0)
		return 1;
	return 0;
}
int yue(int y,int n)
{
	if(n==1||n==3||n==5||n==7||n==8||n==10||n==12)
		return 31;
	if(run(y)==1&&n==2)
		return 29;
	if(run(y)==0&&n==2)
		return 28;
	return 30;
}
int days(int y,int m,int d)
{
	int k=0;
	for(int i=1;i<m;i++)
		k+=yue(y,i);
	k+=d;
	return k;
}
int main()
{
	int y,m,d;
	scanf("%d %d %d",&y,&m,&d);
	printf("%d",days(y,m,d));
	return 0;
}
int main()
{
	int a,b,c,n;
	scanf("%d %d %d",&a,&b,&c);
	if(a%400==0||(a%4==0&&a%100!=0))
	{
		switch (b){
		case 1:
			{
				n=c;
				break;
			}
        case 2:
			{
				n=31+c;
	break;
			}
        case 3:
			{
				n=60+c;
	break;
			}
        case 4:
			{
				n=91+c;
	break;
			}
        case 5:
			{
				n=121+c;
	break;
			}
        case 6:
			{
				n=152+c;
	break;
			}
        case 7:
			{
				n=182+c;
	break;
			}
        case 8:
			{
				n=213+c;
	break;
			}
        case 9:
			{
				n=244+c;
	break;
			}
        case 10:
			{
				n=274+c;
	break;
			}
        case 11:
			{
				n=305+c;
	break;
			}
        case 12:
			{
				n=335+c;
	break;
			}
		}

	}
	else
	{
      switch (b){
		case 1:
			{
				n=c;
	break;
			}
        case 2:
			{
				n=31+c;
	break;
			}
        case 3:
			{
				n=59+c;
	break;
			}
        case 4:
			{
				n=90+c;
	break;
			}
        case 5:
			{
				n=120+c;
	break;
			}
        case 6:
			{
				n=151+c;
	break;
			}
        case 7:
			{
				n=181+c;
	break;
			}
        case 8:
			{
				n=212+c;
	break;
			}
        case 9:
			{
				n=243+c;
	break;
			}
        case 10:
			{
				n=273+c;
	break;
			}
        case 11:
			{
				n=304+c;
	break;
			}
        case 12:
			{
				n=334+c;
	break;
			}
		}
	}
	printf("%d",n);
	return 0;
	}
int main()
{
	int y,m,d,a,s;
	scanf("%d%d%d",&y,&m,&d);
	if((y%4==0&&y%100!=0)||(y%100==0&&y%400==0)){
		a=29;
	}
	else a=28;
	if(m==1){
		s=d;
	}
	else if(m==2){
		s=31+d;
	}
	else if(m==3){
		s=31+a+d;
	}
	else if(m==4){
		s=31*2+a+d;
	}
	else if(m==5){
		s=31*2+a+30+d;
	}
	else if(m==6){
		s=31*3+a+d+30;
	}
	else if(m==7){
		s=31*3+a+d+30*2;
	}
	else if(m==8){
		s=31*4+a+d+30*2;
	}
	else if(m==9){
		s=31*5+a+d+30*2;
	}
	else if(m==10){
		s=31*5+a+d+30*3;
	}
	else if(m==11){
		s=31*6+a+d+30*3;
	}
	else if(m==12){
		s=31*6+a+d+30*4;
	}
	else;
	printf("%d\n",s);
	return 0;
}
int main()
{
    int year,month,day,daynum=0,i;
    cin>>year>>month>>day;
    int month1[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int month2[12]={31,29,31,30,31,30,31,31,30,31,30,31};
    int judgeleap;
    if((year%4==0&&year%100!=0)||(year%400==0))
    {
        for(i=0;i<month-1;i++)
        {
            daynum+=month2[i];
        }
    }
    else
    {
        for(i=0;i<month-1;i++)
        {
            daynum+=month1[i];
        }
    }
    daynum=daynum+day;
    cout<<daynum;
    return 0;
}
int leap(int a)
{
	int z;
	if ((a%4==0)&&(a%100!=0)||(a%400==0)) z=1;
	else z=0;
return z;
}
void main()
{
	int i,m;
	int n[5][3];
	int total[5];
	for(i=0;i<=4;i++) scanf("%d %d %d",&n[i][0],&n[i][1],&n[i][2]);
	int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	for(i=0;i<=4;i++)
	{
		month[1]=28+leap(n[i][0]);
	    total[i]=0;
	    for(m=0;m<=n[i][1]-2;m++) total[i]=total[i]+month[m];
	    total[i]=total[i]+n[i][2];
	    printf("%d\n",total[i]);
	}
}
int main()
{
	int i,a,b,c,sum=0;
	scanf("%d%d%d",&a,&b,&c);
    if(b==1)
		sum=0;
	else if(b==2)
		sum=31;
	else
	{
		sum=31;
        if((a%400==0)||(a%4==0&&a%100!=0))
			sum=sum+29;
		else sum=sum+28;
    for(i=3;i<b;i++)
	{
		if(i==3||i==5||i==7||i==8||i==10)
			sum=sum+31;
		if(i==4||i==6||i==9||i==11)
			sum=sum+30;
	}
	}
	sum=sum+c;
	printf("%d",sum);
	return 0;
}
int main()
{
	int a,b,c,d,e[12],i;
	e[1]=e[3]=e[5]=e[7]=e[8]=e[10]=e[12]=31;
	e[2]=28;
	e[4]=e[6]=e[9]=e[11]=30;
	d=0;
	scanf("%d %d %d",&a,&b,&c);
	if((a%4!=0)||(a%100==0&&a%400!=0))
	{
		for(i=1;i<b;i++)
		{
			d=d+e[i];
		}
		d=d+c;
	}
	else if((a%4==0&&a%100!=0)||(a%400==0))
	{
		for(i=1;i<b;i++)
		{
			e[2]=29;
			d=d+e[i];
		}
		d=d+c;
	}
	printf("%d",d);
	return 0;
}
int main ()
{
	int leap,year,month,day,sum=0;
	int a[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31,},{31,29,31,30,31,30,31,31,30,31,30,31}};
	cin>>year>>month>>day;
	leap=((year%400==0)||(year%100!=0 && year%4==0));
	for (int i=0;i<month-1;i++)
	   sum=sum+a[leap][i];
	sum=sum+day;
	cout<<sum<<endl;
	return 0;

}
int main()
{
	long a,b,c;
         int i=1;
         loop:if(i<=5)
       {
         int n=0;
	scanf("%ld %ld %ld",&a,&b,&c);
	switch(b)
	{
	case 12:n=n+30;
	case 11:n=n+31;
	case 10:n=n+30;
	case 9:n=n+31;
	case 8:n=n+31;
	case 7:n=n+30;
	case 6:n=n+31;
	case 5:n=n+30;
	case 4:n=n+31;
	case 3:n=n+28;
	case 2:n=n+31;
	case 1:n=n+c;break;
	}
	if(((a%4==0&&a%100!=0)||a%400==0)&&b>=3)
		n=n+1;
	printf("%d\n",n);
         i++;
         goto loop;
       }
		return 0;
}
int main()
{
int n,x,y,d;
scanf("%d%d%d\n",&n,&x,&y);
d=0;
if ((x>2)&&(n%400==0)) 
d=1;
if ((x>2)&&(n%100!=0)&&(n%4==0))
 d=1;
d=d+y;
x--;
switch(x){
case 11:d=d+30;
case 10:d=d+31;
case 9:d=d+30;
case 8:d=d+31;
case 7:d=d+31;
case 6:d=d+30;
case 5:d=d+31;
case 4:d=d+30;
case 3:d=d+31;
case 2:d=d+28;
case 1:d=d+31;
}
printf("%d\n",d);
return 0;
}
int main()
{
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int mun,day,year,i;
	int days=0;
	scanf("%d%d%d",&year,&mun,&day);
	days+=day;
	for(i=1;i<mun;i++)
	{
		days+=a[i];
		if(year%4==0&&year%100!=0||year%400==0)
			days+=1;
		
	}
     printf("%d",days);
	return 0;
}
int main(int argc, char* argv[])
{
	int year,month,day,x;
	scanf("%d%d%d",&year,&month,&day);
	switch(month)
	{
	case 1:x=day;break;
	case 2:x=31+day;break;
	case 3:x=31+28+day;break;
	case 4:x=31+28+31+day;break;
	case 5:x=31+28+31+30+day;break;
	case 6:x=31+28+31+30+31+day;break;
	case 7:x=31+28+31+30+31+30+day;break;
	case 8:x=31+28+31+30+31+30+31+day;break;
	case 9:x=31+28+31+30+31+30+31+31+day;break;
	case 10:x=31+28+31+30+31+30+31+31+30+day;break;
	case 11:x=31+28+31+30+31+30+31+31+30+31+day;break;
	case 12:x=31+28+31+30+31+30+31+31+30+31+30+day;break;
	}
    if(year%4==0)
		if(year%100==0)
			if(year%400==0)
				if(month>=3)
				{
				printf("%d",x+1);
				}
				else
				{
                printf("%d",x);
				}
			else
				printf("%d",x);
		else
			if(month>=3)
				{
				printf("%d",x+1);
				}
				else
				{
                printf("%d",x);
				}
	else
		printf("%d",x);


	return 0;
}
int main()
{
	int y, m, d, day = 0;
	scanf("%d%d%d", &y, &m, &d);
	if (y%4 == 0 && y%100 != 0 && y % 400 == 0)
		switch (m)
	{
		case 12 : day = day + 30;
		case 11 : day = day + 31;
		case 10 : day = day + 30;
		case 9 : day = day + 31;
		case 8 : day = day + 31;
		case 7 : day = day + 30;
		case 6 : day = day + 31;
		case 5 : day = day + 30;
		case 4 : day = day + 31;
		case 3 : day = day + 29;
		case 2 : day = day + 31;
		case 1 : day = day + d;
	}
	else
				switch (m)
	{
		case 12 : day = day + 30;
		case 11 : day = day + 31;
		case 10 : day = day + 30;
		case 9 : day = day + 31;
		case 8 : day = day + 31;
		case 7 : day = day + 30;
		case 6 : day = day + 31;
		case 5 : day = day + 30;
		case 4 : day = day + 31;
		case 3 : day = day + 28;
		case 2 : day = day + 31;
		case 1 : day = day + d;
	}
	printf("%d", day);
	

}
main()
{
      int year,month,day,sum;
      scanf("%d %d %d",&year,&month,&day);       
      if((year%4==0&&year%100!=0)||(year%100==0&&year%400==0))
                { switch(month)
                     {
                     case 1: sum=day; break;
                     case 2: sum=31+day; break;
                     case 3: sum=31+29+day; break;
                     case 4: sum=31+29+31+day; break;
                     case 5: sum=31+29+31+30+day;break;
                     case 6: sum=31+29+31+30+31+day;break;
                     case 7: sum=31+29+31+30+31+30+day;break;
                     case 8: sum=31+29+31+30+31+30+31+day;break;
                     case 9: sum=31+29+31+30+31+30+31+31+day;break;
                     case 10: sum=31+29+31+30+31+30+31+31+30+day;break;
                     case 11: sum=31+29+31+30+31+30+31+31+30+31+day;break;
                     case 12: sum=31+29+31+30+31+30+31+31+30+31+30+day;break;
                }
                }
       else
           { switch(month)
                     {
                     case 1: sum=day; break;
                     case 2: sum=31+day; break;
                     case 3: sum=31+28+day; break;
                     case 4: sum=31+28+31+day; break;
                     case 5: sum=31+28+31+30+day;break;
                     case 6: sum=31+28+31+30+31+day;break;
                     case 7: sum=31+28+31+30+31+30+day;break;
                     case 8: sum=31+28+31+30+31+30+31+day;break;
                     case 9: sum=31+28+31+30+31+30+31+31+day;break;
                     case 10: sum=31+28+31+30+31+30+31+31+30+day;break;
                     case 11: sum=31+28+31+30+31+30+31+31+30+31+day;break;
                     case 12: sum=31+28+31+30+31+30+31+31+30+31+30+day;break;
                }  
                }   
                printf("%d",sum);
                getchar();
                getchar();
}
int main(int argc, char* argv[])
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if (a%4==0&&a%100>0||a%400==0)
	{
		int sum=0,i;
		for (i=1;i<b;i++)
		{
			if (i==1||i==3||i==5||i==7||i==8||i==10)
			{
				sum+=31;
			}
			else if (i==2)
			{
				sum+=29;
			}
			else
			{
				sum+=30;
			}
		}
		sum+=c;
		printf("%d\n",sum);
	}
	else
	{	
			int sum=0,i;
		    for (i=1;i<b;i++)
			{if (i==1||i==3||i==5||i==7||i==8||i==10)
			{
				sum+=31;
			}
			else if (i==2)
			{
				sum+=28;
			}
			else
			{
				sum+=30;
			}
		}
		sum+=c;
		printf("%d\n",sum);
	}
return 0;
}
int isRN(int year)
{
	int result;
	if((year%4==0&&year%100!=0)||year%400==0)
		result=1;
	else
		result=0;
	return result;
}
void main()
{
	int year,month,day;
	int i;
	int sum=0;
	scanf("%d%d%d",&year,&month,&day);
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			sum+=31;
		else if(i==4||i==6||i==9||i==11)
			sum+=30;
		else
		{
			if(isRN(year)==1)
				sum+=29;
			else
				sum+=28;
		}
	}
	sum+=day;
	printf("%d",sum);
}
int main()
{
	int year, month, date, February, day;
	scanf("%d %d %d", &year, &month, &date);
	if ((year%4==0 && year%100!=0) || (year%400 == 0))
		February = 29;
	else
		February = 28;
	if (month==1)
		day =  date;
	if (month==2)
		day = 31  + date;
	if (month == 3)
		day = 31 + February  + date;
	if (month == 4)
		day = 31 + February + 31  + date;
	if (month == 5)
		day = 31 + February + 31 + 30  + date;
	if (month == 6)
		day = 31 + February + 31 + 30 + 31 + date;
	if (month == 7)
		day = 31 + February + 31 + 30 + 31 + 30  + date;
	if (month == 8)
		day = 31 + February + 31 + 30 + 31 + 30 + 31  + date;
	if (month == 9)
		day = 31 + February + 31 + 30 + 31 + 30 + 31 + 31 +date;
	if (month == 10)
		day = 31 + February + 31 + 30 + 31 + 30 + 31 + 31 + 30+date;
	if (month == 11)
        day = 31 + February + 31 + 30 + 31 + 30 + 31 + 31 + 30+31+date;	
	if (month == 12)
        day = 31 + February + 31 + 30 + 31 + 30 + 31 + 31 + 30+31+30+date;
	printf("%d\n", day);
	return 0;
}
int main(int argc, char* argv[])
{
int year,month,day,a,rank;
scanf("%d%d%d",&year,&month,&day);
if((year%4==0)&&(year%100!=0)||(year%400==0))
{
a=1;}
else {a=0;}
if(month==1){rank=day;}
if(month==2){rank=31+day;}
if(month==3){rank=59+a+day;}
if(month==4){rank=90+a+day;}
if(month==5){rank=120+a+day;}
if(month==6){rank=151+a+day;}
if(month==7){rank=181+a+day;}
if(month==8){rank=212+a+day;}
if(month==9){rank=243+a+day;}
if(month==10){rank=273+a+day;}
if(month==11){rank=304+a+day;}
if(month==12){rank=334+a+day;}
printf("%d",rank);
return 0;
}
int main ()
{
int y,m,d,i,s=0;
int m1[12]={31,28,31,30,31,30,31,31,30,31,30,31},m2[12]={31,29,31,30,31,30,31,31,30,31,30,31};
cin >> y >> m >> d;
if ((y%400 == 0) || (y%4 == 0 && y%100 !=0))
for (i=0;i<m-1;i++)
s += m2[i];
else
for (i=0;i<m-1;i++)
s += m1[i];
cout << s+d << endl;
return 0;
}
int main()
{
    int y,m,d,s=0,a[12],i;
    scanf("%d %d %d",&y,&m,&d); 
    if((y%400==0)||(y%4==0&&y%100!=0)) 
    a[1]=29;
    else
    a[1]=28;
    a[0]=a[2]=a[4]=a[6]=a[7]=a[9]=a[11]=31;
    a[3]=a[5]=a[8]=a[10]=30;
    for(i=0;i<m-1;i++)
    {
        s=s+a[i];
    }
    s=s+d;
    printf("%d",s);
}
int main()
{
	int a,b,c,d;
	scanf("%d %d %d",&a,&b,&c);
	if((a%100!=0&&a/4==0)||a%400==0)
	{
      switch(b)
	  {
	  case 1:printf("%d",c); break;
	  case 2:printf("%d",d=31+c);break;
      case 3:printf("%d",d=60+c);break;
	  case 4:printf("%d",d=91+c);break;
	  case 5:printf("%d",d=121+c);break;
	  case 6:printf("%d",d=152+c);break;
	  case 7:printf("%d",d=182+c);break;
	  case 8:printf("%d",d=213+c);break;
	  case 9:printf("%d",d=244+c);break;
	  case 10:printf("%d",d=274+c);break;
	  case 11:printf("%d",d=305+c);break;
	  case 12:printf("%d",d=335+c);break;
	  }
	}
	else 
	{
		switch(b)
		{
        case 1:printf("%d",c);break;
		case 2:printf("%d",d=31+c);break;
		case 3:printf("%d",d=59+c);break;
		case 4:printf("%d",d=90+c);break;
		case 5:printf("%d",d=120+c);break;
		case 6:printf("%d",d=151+c);break;
		case 7:printf("%d",d=181+c);break;
		case 8:printf("%d",d=212+c);break;
		case 9:printf("%d",d=243+c);break;
		case 10:printf("%d",d=273+c);break;
		case 11:printf("%d",d=304+c);break;
		case 12:printf("%d",d=334+c);break;
		}
	}
 return 0;
}
int main()
{
	int A[13],X,B;
	int N;
	cin >> N >> X >> B;
	if (N%100)
		if (N%4 == 0) A[2] = 29; else A[2] = 28;
	else if (N%400 == 0) A[2] = 29; else A[2] = 28;
	A[1] = A[3] = A[5] = A[7] = A[8] = A[10] = A[11] = 31;
	A[4] = A[6] = A[9] = A[11] = 30;
	int Ans = B;
	for (int I = 1; I < X; I ++) Ans += A[I];
	cout << Ans << endl;
}
int main()
{
	int y,m,d,n=0;
	cin>>y>>m>>d;
	int ping[12]={31,28,31,30,31,30,31,31,30,31,30,31},run[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	if(y%4!=0||(y%100==0&&y%400!=0))
	{
		for(int i=0;i<m-1;i++)
			n=n+ping[i];
		n=n+d;
	}
	else
	{
		for(int i=0;i<m-1;i++)
			n=n+run[i];
		n=n+d;
	}
	cout<<n<<endl;

	return 0;
}
int main()
{
	int y,m,md=0,d,day,i;
	scanf("%d%d%d",&y,&m,&d);
	int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    for (i=0;i<m-1;i++)
	{
		md=md+month[i];
	}
	day=md+d;
	printf("%d",day);
	return 0;
}
int main()
{
	int a,b,c,m,n;
	scanf("%d%d%d",&a,&b,&c);
	if(a%400==0||a%4==0 && a%100!=0)
	{
		m=29;
	  if(b==1)
		  n=c;
	  else if(b==2)
		  n=31+c;
	  else if(b==3)
		  n=31+m+c;
	  else if(b==4)
		  n=31+m+31+c;
	  else if(b==5)
		  n=31+m+31+30+c;
	  else if(b==6)
		  n=31+m+31+30+31+c;
	  else if(b==7)
		  n=31+m+31+30+31+30+c;
	  else if(b==8)
		  n=31+m+31+30+31+30+31+c;
	  else if(b==9)
		  n=31+m+31+30+31+30+31+31+c;
      else if(b==10)
		  n=31+m+31+30+31+30+31+31+30+c;
	  else if(b==11)
		  n=31+m+31+30+31+30+31+31+30+31+c;
	  else
		  n=31+m+31+30+31+30+31+31+30+31+30+c;
	}
	else
	{
		m=28;
      if(b==1)
		  n=c;
	  else if(b==2)
		  n=31+c;
	  else if(b==3)
		  n=31+m+c;
	  else if(b==4)
		  n=31+m+31+c;
	  else if(b==5)
		  n=31+m+31+30+c;
	  else if(b==6)
		  n=31+m+31+30+31+c;
	  else if(b==7)
		  n=31+m+31+30+31+30+c;
	  else if(b==8)
		  n=31+m+31+30+31+30+31+c;
	  else if(b==9)
		  n=31+m+31+30+31+30+31+31+c;
      else if(b==10)
		  n=31+m+31+30+31+30+31+31+30+c;
	  else if(b==11)
		  n=31+m+31+30+31+30+31+31+30+31+c;
	  else
		  n=31+m+31+30+31+30+31+31+30+31+30+c;
	}
	printf("%d",n);
	return 0;
}
int leap_year(int y)
{
	if(y%400==0)
		return 1;
	else if(y%4==0&&y%100!=0)
		return 1;
	else
		return 0;
}
int main()
{
	int y,m,d,count;
	scanf("%d%d%d",&y,&m,&d);
	if(leap_year(y))
	{
		switch (m)
		{
		case 1:count=0;break;
		case 2:count=31;break;
		case 3:count=31+29;break;
		case 4:count=31+29+31;break;
		case 5:count=31+29+31+30;break;
		case 6:count=31+29+31+30+31;break;
		case 7:count=31+29+31+30+31+30;break;
		case 8:count=31+29+31+30+31+30+31;break;
		case 9:count=31+29+31+30+31+30+31+31;break;
		case 10:count=31+29+31+30+31+30+31+31+30;break;
		case 11:count=31+29+31+30+31+30+31+31+30+31;break;
		case 12:count=31+29+31+30+31+30+31+31+30+31+30;break;
		}
		count+=d;
	}
	else
	{
		switch (m)
		{
		case 1:count=0;break;
		case 2:count=31;break;
		case 3:count=31+28;break;
		case 4:count=31+28+31;break;
		case 5:count=31+28+31+30;break;
		case 6:count=31+28+31+30+31;break;
		case 7:count=31+28+31+30+31+30;break;
		case 8:count=31+28+31+30+31+30+31;break;
		case 9:count=31+28+31+30+31+30+31+31;break;
		case 10:count=31+28+31+30+31+30+31+31+30;break;
		case 11:count=31+28+31+30+31+30+31+31+30+31;break;
		case 12:count=31+28+31+30+31+30+31+31+30+31+30;break;
		}
		count+=d;
	}
	printf("%d\n",count);
	return 0;
}
int main()
{   
	int year,month,day,b,i;
	for(i=1;i<=5;++i)
	{
	int count(int month,int year,int day);
	scanf("%d %d %d",&year,&month,&day);
	b=count(month,year,day);
	printf("%d\n",b);
	}
	scanf("%d",&b);
	return 0;
}

    int count(int month,int year,int day)
	{
		int a;
		if((year%4==0&&year%100!=0)||year%400==0)
		{
			switch(month)
			{
			case(1):
			a=day;break;
			case(2):
			a=31+day;break;
			case(3):
			a=60+day;break;
			case(4):
			a=91+day;break;
			case(5):
				a=121+day;break;
			case(6):
				a=152+day;break;
			case(7):
				a=182+day;break;
			case(8):
				a=213+day;break;
			case(9):
				a=244+day;break;
			case(10):
				a=274+day;break;
			case(11):
				a=305+day;break;
			case(12):
				a=335+day;break;
			}
		}
		else
		{
			switch(month)
			{
			case(1):
			a=day;break;
			case(2):
			a=31+day;break;
			case(3):
			a=59+day;break;
			case(4):
			a=90+day;break;
			case(5):
				a=120+day;break;
			case(6):
				a=151+day;break;
			case(7):
				a=181+day;break;
			case(8):
				a=212+day;break;
			case(9):
				a=243+day;break;
			case(10):
				a=273+day;break;
			case(11):
				a=304+day;break;
			case(12):
				a=334+day;break;
			}
		}
		return(a);
	}
int main()        
{                         
  int year,month,day;
  int k=0;
  int monthday[12]={31,28,31,30,31,30,31,31,30,31,30,31};
  scanf("%d %d %d",&year,&month,&day);
  if(month==1)k=k+day;
  else if(month==2)k=k+31+day;
  else if(month==3)k=k+31+28+day;
  else if(month==4)k=k+31+28+31+day;
  else if(month==5)k=k+31+28+31+30+day;
  else if(month==6)k=k+31+28+31+30+31+day;
  else if(month==7)k=k+31+28+31+30+31+30+day;
  else if(month==8)k=k+31+28+31+30+31+30+31+day;
  else if(month==9)k=k+31+28+31+30+31+30+31+31+day;
  else if(month==10)k=k+31+28+31+30+31+30+31+31+30+day;
  else if(month==11)k=k+31+28+31+30+31+30+31+31+30+31+day;
  else if(month==12)k=k+31+28+31+30+31+30+31+31+30+31+30+day;
  if( (( (year%4==0)&&(year%100!=0) ) ||(year%400==0))&&(month>2))k=k+1;
  printf("%d",k);
  return 0;
}