semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int m(int n)
{
    if (n%100!=0)
    {
                 if(n%4==0)
                 return(1);
                 else
                 return(0);
    }
    else
    {
        if(n%400==0)
        return(1);
        else
        return(0);
    }
    
}
main()
{
      int a,b,c,x;
      scanf("%d %d %d",&a,&b,&c);
      if(m(a)==1)
      {
                 if(b==1)
                 x=c;
                 if(b==2)
                 x=31+c;
                 if(b==3)
                 x=60+c;
                 if(b==4)
                 x=91+c;
                 if(b==5)
                 x=121+c;
                 if(b==6)
                 x=152+c;
                 if(b==7)
                 x=182+c;
                 if(b==8)
                 x=213+c;
                 if(b==9)
                 x=244+c;
                 if(b==10)
                 x=274+c;
                 if(b==11)
                 x=305+c;
                 if(b==12)
                 x=335+c;
              printf("%d",x);
      }
      else
      {
          if(b==1)
                 x=c;
                 if(b==2)
                 x=31+c;
                 if(b==3)
                 x=59+c;
                 if(b==4)
                 x=90+c;
                 if(b==5)
                 x=120+c;
                 if(b==6)
                 x=151+c;
                 if(b==7)
                 x=181+c;
                 if(b==8)
                 x=212+c;
                 if(b==9)
                 x=243+c;
                 if(b==10)
                 x=273+c;
                 if(b==11)
                 x=304+c;
                 if(b==12)
                 x=334+c;
                printf("%d",x);
      }
      getchar();
      getchar();
}
int main()
{
	int yy,mm,dd,m=0,days=0;
	scanf("%d%d%d",&yy,&mm,&dd);
    do{
		if(m==1||m==3||m==5||m==7||m==8||m==10||m==12)days=days+31;
		else if(m==4||m==6||m==9||m==11)days=days+30;
		else if((((yy%4==0&&yy%100!=0)||yy%400==0))&&m==2)days=days+29;
		else if((yy%4!=0||yy%100==0)&&m==2)days=days+28;
		m++;
	}while(m<mm);
	days=days+dd;
	printf("%d\n",days);
	return 0;
}
int main(int argc, char* argv[])
{
	int year,math,day;
	int date;
	scanf ("%d %d %d",&year,&math,&day);
	if(year%4==0&&year%100!=0||year%400==0)
	{
	  if (math==1)
	  {
	   	date=day;
	  }
	  if (math==2)
	  {
		date=31+day;
	  }
      if (math==3)
	  {
		date=31+29+day;
	  }
      if (math==4)
	  {
		date=31+29+31+day;
	  }
      if (math==5)
	  {
		date=31+29+31+30+day;
	  }
	  if (math==6)
	  {
		date=31+29+31+30+31+day;
	  }
	  if (math==7)
	  {
		date=31+29+31+30+31+30+day;
	  }
	  if (math==8)
	  {
		date=31+29+31+30+31+30+31+day;
	  }
	  if (math==9)
	  {
		date=31+29+31+30+31+30+31+31+day;
	  }
	  if (math==10)
	  {
		date=31+29+31+30+31+30+31+31+30+day;
	  }
	  if (math==11)
	  {
		date=31+29+31+30+31+30+31+31+30+31+day;
	  }
	  if (math==12)
	  {
		date=31+29+31+30+31+30+31+31+30+31+30+day;
	  }
	}
	if (year%4!=0||(year%100==0)&&year%400!=0)
	{
	  if (math==1)
	  {
	   	date=day;
	  }
	  if (math==2)
	  {
		date=31+day;
	  }
      if (math==3)
	  {
		date=31+28+day;
	  }
      if (math==4)
	  {
		date=31+28+31+day;
	  }
      if (math==5)
	  {
		date=31+28+31+30+day;
	  }
	  if (math==6)
	  {
		date=31+28+31+30+31+day;
	  }
	  if (math==7)
	  {
		date=31+28+31+30+31+30+day;
	  }
	  if (math==8)
	  {
		date=31+28+31+30+31+30+31+day;
	  }
	  if (math==9)
	  {
		date=31+28+31+30+31+30+31+31+day;
	  }
	  if (math==10)
	  {
		date=31+28+31+30+31+30+31+31+30+day;
	  }
	  if (math==11)
	  {
		date=31+28+31+30+31+30+31+31+30+31+day;
	  }
	  if (math==12)
	  {
		date=31+28+31+30+31+30+31+31+30+31+30+day;
	  }
	}




	printf("%d",date);
	return 0;
}
void main()
{
	int year,month,day;
	int feb,i,n=0;

	scanf("%d%d%d",&year,&month,&day);

	if (year%4!=0)
		feb=28;
	else
	{
		if (year%100!=0)
			feb=29;
		else
		{
			if (year%400==0)
				feb=29;
			else
				feb=28;
		}
	}
			

	
	for (i=1;i<month;i++)
	{
		if (i==2 )
			n=n+feb;
		else
		{
			if (i==4||i==6||i==9||i==11)
				n=n+30;
			else
				n=n+31;
		}
	}

	n=n+day;

	printf("%d",n);




}
int main(int argc, char* argv[])
{
	int year,month,day;
	int monthday[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d",&year,&month,&day);
	int i;
	int sum=0;
	 for(i=1;i<month;i++){
        sum=sum+monthday[i-1];
	}
	sum=sum+day;
     int a;
	 a=year%4;
	if(month>2 && a==0){
		sum=sum+1;
	}
	 
	
	printf("%d",sum);
	return 0;
}
int   day_month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};   
  int   sum_day(int   month,int   day)   
  {   int   i;   
      for(i=0;i<month;i++)   
      day=day+day_month[i];   
      return(day);   
    }   
  int   leap(int   year)   
  {   int   leap;   
      leap=year%4==0   &&   year%100!=0   ||   year%400==0;   
      return(leap);   
    }   
  int main()   
  {   int   year,month,day,days,a;
  
      for(a=1;a<=5;a++)
      {scanf("%d%d%d",&year,&month,&day);   
        
        
      days=sum_day(month,day);   
      if(leap(year)   &&   month>=3)   
          days=days+1;   
      printf("%d\n",days);}   
      
  return 0;
  }
int main()
{
	int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int a,b,c,d,j;
		scanf("%d%d%d",&a,&b,&c);
	if 
		((a%4==0)&&(a%100!=0)||(a%400==0))
		days[2]++;
	d=c;
	for(j=1;j<b;j++)
				d+=days[j];

		printf("%d\n",d);
if 
		((a%4==0)&&(a%100!=0)||(a%400==0))

	
	return 0;
}
int main()
{
int a,b,c;
int t=0;
scanf("%d %d %d",&a,&b,&c);
if(a%400==0||(a%4==0&&a%100!=0))
{
	
	for(int i=1;i<b;i++)
	{
	if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
	{
		t+=31;
	}
	else if(i==4||i==6||i==9||i==11)
	{
		t+=30;
	}
	else
	{
		t+=29;
	}
	}
}
else
{
	for(int j=1;j<b;j++)
	{
	if(j==1||j==3||j==5||j==7||j==8||j==10||j==12)
	{
		t+=31;
	}
	else if(j==4||j==6||j==9||j==11)
	{
		t+=30;
	}
	else
	{
		t+=28;
	}
	}
}
t=t+c;

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

}
int main(int argc, char* argv[])
{   int a,b,c;

	int t=0;
	int aa[12]={31,0,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d",&a,&b,&c);
	for(int i =0;i<b-1;i++){
		t=t+aa[i];
	}
	if(b>2){
		if((a%4==0)&&((a%100)!=0)||(a%400==0))
		{
			t=t+29;
		}else{
			t=t+28;
		}
	}
	t=t+c;
    printf("%d",t);

	return 0;
}
int nian(int m)
{  
    if ((m%400==0)||((m%100!=0)&&(m%4==0)))
    return 1;
    else
     return 0;
}
int main()
{
    int i,s=0,n,y,r,a[12];
    scanf("%d%d%d",&n,&y,&r);
    a[0]=a[2]=a[4]=a[6]=a[7]=a[9]=a[11]=31;
    a[3]=a[5]=a[8]=a[10]=30;
    if (nian(n))
       a[1]=29; else a[1]=28;
       for (i=0;i<y-1;i++)
       s+=a[i];
       s+=r;
       printf("%d",s);
       return 0;
}
int f(int x)
{
if(x%4!=0)
return 0;
else if((x%100==0)&&(x%400!=0))
return 0;
else
return 1;
}
main()
{
      int y,m,d;
      int j=1; 
      int n=0;
      scanf("%d %d %d",&y,&m,&d);
      int a[13];
      a[1]=31;
      if(f(y)==0)
      a[2]=28;
      else
      a[2]=29;
      a[3]=31;
      a[4]=30;
      a[5]=31;
      a[6]=30;
      a[7]=31;
      a[8]=31;
      a[9]=30;
      a[10]=31;
      a[11]=30;
      a[12]=31;
      for(j=1;j<m;j++)
      n=n+a[j];
      n=n+d;
      printf("%d\n",n);
      }
int main()
{
	int year,month,day,a,i=1;
	while(i<=5)
	{
	scanf("%d %d %d",&year,&month,&day);
	if (((year%4==0&&year%100!=0)||year%400==0)==1)
	{
		switch(month)
		{
		case 1: a=day;break;
		case 2: a=31+day;break;
		case 3: a=31+29+day;break;
		case 4: a=31+29+31+day;break;
		case 5: a=31+29+31+30+day;break;
        case 6: a=31+29+31+30+31+day;break;
        case 7: a=31+29+31+30+31+30+day;break;
        case 8: a=31+29+31+30+31+30+31+day;break;
        case 9: a=31+29+31+30+31+30+31+31+day;break;
        case 10: a=31+29+31+30+31+30+31+31+30+day;break;
        case 11: a=31+29+31+30+31+30+31+31+30+31+day;break;
	    case 12: a=31+29+31+30+31+30+31+31+30+31+30+day;break;
		default : printf("error\n");
		}
	}
	else
	{
		switch(month)
		{
		case 1: a=day;break;
		case 2: a=31+day;break;
		case 3: a=31+28+day;break;
		case 4: a=31+28+31+day;break;
		case 5: a=31+28+31+30+day;break;
        case 6: a=31+28+31+30+31+day;break;
        case 7: a=31+28+31+30+31+30+day;break;
        case 8: a=31+28+31+30+31+30+31+day;break;
        case 9: a=31+28+31+30+31+30+31+31+day;break;
        case 10: a=31+28+31+30+31+30+31+31+30+day;break;
        case 11: a=31+28+31+30+31+30+31+31+30+31+day;break;
	    case 12: a=31+28+31+30+31+30+31+31+30+31+30+day;break;
		default : printf("error\n");
		}
	}
	printf("%d\n",a);
	i=i+1;
	}
	return 0;
}
int main(){
	int y,m,d,n;
    scanf("%d %d %d", &y, &m, &d); 
	if ((y%100!=0&&y%4==0)||(y%400==0))
	{
switch(m){
case 1:n=d;break;
case 2:n=31+d;break;
case 3:n=60+d;break;
case 4:n=91+d;break;
case 5:n=121+d;break;
case 6:n=152+d;break;
case 7:n=182+d;break;
case 8:n=213+d;break;
case 9:n=244+d;break;
case 10:n=274+d;break;
case 11:n=305+d;break;
default:n=335+d;
	}
	}
	else 
	{
switch(m){
case 1:n=d;break;
case 2:n=31+d;break;
case 3:n=59+d;break;
case 4:n=90+d;break;
case 5:n=120+d;break;
case 6:n=151+d;break;
case 7:n=181+d;break;
case 8:n=212+d;break;
case 9:n=243+d;break;
case 10:n=273+d;break;
case 11:n=304+d;break;
default:n=334+d;
}
	}
	printf("%d",n);
	return 0;
}
int main()
{
	int y,m,d,p;
	scanf ("%d%d%d", &y, &m, &d);
	if (y%4==0)
		if (y%100==0)
			if (y%400==0)
			{
				p=29;
			}
		    else
			{
			    p=28;
			}
		else
		{
			p=29;
		}
	else
	{
		p=28;
	} 		
	
	switch (m)
	{
	case 1:
		{printf("%d",d);
		break;
		}
	case 2:
		{printf("%d", d+31);break;}
	case 3:
		{printf("%d", d+31+p);break;}
	case 4:
		{printf("%d", d+31*2+p);break;}
	case 5:
		{printf("%d", d+31*2+p+30);break;}
	case 6:
		{printf("%d", d+31*3+p+30);break;}
	case 7:
		{printf("%d", d+31*3+p+30*2);break;}
	case 8:
		{printf("%d", d+31*4+p+30*2);break;}
    case 9:
		{printf("%d", d+31*5+p+30*2);break;}
	case 10:
		{printf("%d", d+31*5+p+30*3);break;}
	case 11:
		{printf("%d", d+31*6+p+30*3);break;}
	default:
		{printf("%d", d+31*6+p+30*4);}
	}
	
	return 0;
}
int main()
{
	int y,m,d,run=0,M[13],i,D;
	scanf("%d%d%d",&y,&m,&d);
	D=d;
	if((y%400==0)||((y%100!=0)&&(y%4==0))){
		run=1;
	}
	else run=0;
	for(i=1;i<13;i++){
		switch(i){
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			M[i]=31;
			break;
		default:
			M[i]=30;
		}
	}
	if(run==1){
		M[2]=29;
	}
	else M[2]=28;
	for(i=1;i<m;i++){
		D=D+M[i];
	}
	printf("%d",D);
	return 0;
}
int f(int n)
 {      
   int sum;
  switch (n)
  {case 1: sum=0;break;
   case 2:sum=31; break;
	case 3:sum=(31+28);break;
	case 4:sum=(31+28+31);break;
	case 5:sum=(31*2+28+30);break;
	case 6:sum=(31*3+28+30);break;
	case 7:sum=(31*3+28+30*2);break;
    case 8:sum=(31*4+28+30*2);break;
	case 9:sum=(31*5+28+30*2);break;
	case 10:sum=(31*5+28+30*3);break;
	case 11:sum=(31*6+28+30*3);break;
	case 12:sum=(31*6+28+30*4);
  }
  return (sum);
}
int main()
 {
     int month[5],day[5],year[5],d[5],i;
	 for(i=0;i<=4;i++)
	    scanf("%d%d%d",&year[i],&month[i],&day[i]);
	 for(i=0;i<=4;i++)
	 {
		 if((year[i]%4==0&&year[i]%100!=0||year[i]%400==0)&&month[i]>2)
	       d[i]=f(month[i])+day[i]+1;
		 else
		   d[i]=f(month[i])+day[i];
		printf("%d\n",d[i]);
	 }
	 return 0;
 }
int main(int argc, char* argv[])
{
	int n=0,N;
	int y,m,d;
	scanf("%d %d %d",&y,&m,&d);
	if(y%100!=0&&y%4==0){
		int p[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
		if(d<1||d>p[m])printf("Illegal input.\n");
		else{
			int j;
			for(j=0;j<m;j++){
				n=n+p[j];
			}
			N=n+d;
			printf("%d\n",N);
		}
	}
	else if(y%4!=0){
		int q[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
		if(d<1||d>q[m])printf("Illegal input.\n");
        else{
			int j;
			for(j=0;j<m;j++){
				n=n+q[j];
			}
			N=n+d;
			printf("%d\n",N);
		}
		
	}
	return 0;
}
int main()
{
    int year,month,day,all;
    scanf("%d %d %d",&year,&month,&day);
    if((year%4==0&&year%100!=0)||(year%400==0))
    {
          if(month==1)
          {
                      all=day;
          }
          if(month==2)
          {
                      all=day+31;
          }
          if(month==3)
          {
                      all=day+29+31;
          }
          if(month==4)
          {
                      all=day+29+31+31;
          }
          if(month==5)
          {
                      all=day+29+31+31+30;
          }
          if(month==6)
          {
                      all=day+31+29+31+30+31;
          }
          if(month==7)
          {
                      all=day+31+29+31+30+31+30;
          }
          if(month==8)
          {
                      all=day+31+29+31+30+31+30+31;
          }
          if(month==9)
          {
                      all=day+31+29+31+30+31+30+31+31;
          }
          if(month==10)
          {
                      all=day+31+29+31+30+31+30+31+31+30;
          }
          if(month==11)
          {
                      all=day+31+29+31+30+31+30+31+31+30+31;
          }
          if(month==12)
          {
                      all=day+31+29+31+30+31+30+31+31+30+31+30;
          }
    }
    else
    {
        if(month==1)
          {
                      all=day;
          }
          if(month==2)
          {
                      all=day+31;
          }
          if(month==3)
          {
                      all=day+28+31;
          }
          if(month==4)
          {
                      all=day+28+31+31;
          }
          if(month==5)
          {
                      all=day+28+31+31+30;
          }
          if(month==6)
          {
                      all=day+31+28+31+30+31;
          }
          if(month==7)
          {
                      all=day+31+28+31+30+31+30;
          }
          if(month==8)
          {
                      all=day+31+28+31+30+31+30+31;
          }
          if(month==9)
          {
                      all=day+31+28+31+30+31+30+31+31;
          }
          if(month==10)
          {
                      all=day+31+28+31+30+31+30+31+31+30;
          }
          if(month==11)
          {
                      all=day+31+28+31+30+31+30+31+31+30+31;
          }
          if(month==12)
          {
                      all=day+31+28+31+30+31+30+31+31+30+31+30;
          }
    }
    printf("%d",all);
}
int main()
{
	int day = 0, y, m, d,i, month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	cin >> y >> m >> d;
	if(y % 400 == 0 || (y % 100 != 0 && y % 4 == 0))
		month[2] = 29;
	for(i = 1; i < m; i++)
		day += month[i];
	day += d;
	cout << day;


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

  {switch(mon)
  {
	  case 1: re=day; break;
      case 2: re=31+day; break;
      case 3: re=31+28+day; break;
	  case 4: re=31+28+31+day; break;
	  case 5: re=31+28+31+30+day; break;
	  case 6: re=31+28+31+30+31+day; break;
	  case 7: re=31+28+31+30+31+30+day; break;
	  case 8: re=31+28+31+30+31+30+31+day; break;
      case 9: re=31+28+31+30+31+30+31+31+day; break;
	  case 10: re=31+28+31+30+31+30+31+31+30+day; break;
	  case 11: re=31+28+31+30+31+30+31+31+30+31+day; break;
				  case 12: re=31+28+31+30+31+30+31+31+30+31+30+day; break;
  }
					  
  }
  printf("%d",re);
  return 0;
}
int main()
{
	int y=0,m=0,d=0,sum=0,i=0;
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	cin>>y>>m>>d;
	if(y%400==0||(y%4==0&&y%100!=0))
		a[1]=29;
	for(i=0;i<=m-2;i++)
	{
		sum=sum+a[i];
	}
    sum=sum+d;
	cout<<sum<<endl;
	return 0;
}
int main()
{
	int a,b,c;
	int d=0;
	int x[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

	int y[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	scanf("%d %d %d",&a,&b,&c);
	int i;
	if((a%4==0&&a%100!=0)||(a%100==0&&a%400==0))
	{
		for(i=1;i<b;i++)
		{
			d=d+y[i];
		}
		printf("%d",d+c);
	}
	else
	{
        for(i=1;i<b;i++)
		{
			d=d+x[i];
		}
		printf("%d",d+c);
	}
	return 0;
}
// ???.cpp : Defines the entry point for the console application.
//


int main()
{
	int y=0,m=0,d=0;
    int dd[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int n=0;
	int i;

	scanf("%d%d%d",&y,&m,&d);
	if((y%400==0)||((y%4==0)&&(y%100!=0)))
	{
		dd[1]=29;
	}

	for(i=0;i<m-1;i++){
		n=n+dd[i];
	}

	n=n+d;
	printf("%d",n);
	return 0;
}
void main()
{
	unsigned long int year,month,day,b[30][3];
	int a,c,d,i;
	for(i=0;i<5;i++)
	{
		scanf("%d %d %d",&year,&month,&day);
		b[i][0]=year;
		b[i][1]=month;
		b[i][2]=day;
	}
	for(i=0;i<5;i++)
	{	
		year=b[i][0];
	    month=b[i][1];
		day=b[i][2];
	a=(year%4==0&&year%100!=0)||year%400==0;
    if(a==1)
	{
	switch(month)
	{case 1:c=0;break;
	 case 2:c=31;break;
     case 3:c=31+29;break;
     case 4:c=31+29+31;break;
	 case 5:c=31+29+31+30;break;
	 case 6:c=31+29+31+30+31;break;
	 case 7:c=31+29+31+30+31+30;break;
	 case 8:c=31+29+31+30+31+30+31;break;
	 case 9:c=31+29+31+30+31+30+31+31;break;
     case 10:c=31+29+31+30+31+30+31+31+30;break;
     case 11:c=31+29+31+30+31+30+31+31+30+31;break;
     case 12:c=31+29+31+30+31+30+31+31+30+31+30;break;
	}
	
	}
	else
	{
	switch(month)
	{case 1:c=0;break;
	 case 2:c=31;break;
     case 3:c=31+28;break;
     case 4:c=31+28+31;break;
	 case 5:c=31+28+31+30;break;
	 case 6:c=31+28+31+30+31;break;
	 case 7:c=31+28+31+30+31+30;break;
	 case 8:c=31+28+31+30+31+30+31;break;
	 case 9:c=31+28+31+30+31+30+31+31;break;
     case 10:c=31+28+31+30+31+30+31+31+30;break;
     case 11:c=31+28+31+30+31+30+31+31+30+31;break;
     case 12:c=31+28+31+30+31+30+31+31+30+31+30;break;
	}
	}
	d=c+day;
	printf("%d\n",d);
	}
}
int main ()
{
	int y,m,d,k,leap=0,i,sum=0;
	cin >>y>>m>>d;
	if ((y%4==0&&y%100!=0)||y%400==0)
		leap=1;
	for (i=1;i<m;i++)
	{
		switch (i)
		{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			k=31;
			break;
		case 4:
		case 6:
		case 9:
		case 11:
			k=30;
			break;
		case 2: if (leap==1)
					k=29;
				else k=28;
				break;
		}
		sum+=k;
	}
	cout <<sum+d;
	return 0;
}
static int days[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 

static int isleapyear(int year) { 
	return (year % 4 == 0 && year % 100 !=0 ) || year % 400 == 0; 
} 

int main() { 
	int year, month, day;
	int n = 0;  // to store the result. 
	int i;

	scanf("%d %d %d", &year, &month, &day);

	// add days of former months. 
	for (i = 1; i < month; i++)
		n = n + days[i];
	// add days of this month. 
	n = n + day;
	// check leap year 
	if (month > 2 && isleapyear(year))
		n++; 
	
	printf("%d\n", n); 
	return 0;
}
int main()
{
	int month,date,n=0,i,year,p;
	scanf("%d %d %d",&year,&month,&date);
	if(year%400==0||(year%100!=0&&year%4==0))
		p=29;
	else
		p=28;
	for(i=1;i<month;i++)
	{
		switch (i)
		{
		case 1:
			n+=31;
			break;
		case 2:
			n+=p;
			break;
		case 3:
			n+=31;
			break;
		case 4:
			n+=30;
			break;
		case 5:
			n+=31;
			break;
		case 6:
			n+=30;
			break;
		case 7:
			n+=31;
			break;
		case 8:
			n+=31;
			break;
		case 9:
			n+=30;
			break;
		case 10:
			n+=31;
			break;
		case 11:
			n+=30;
			break;
		}
	}
	n+=date;
	printf("%d\n",n);
	return 0;
}
int main(){
	int a,b,c,y;
	scanf("%d\t%d\t%d",&a,&b,&c);
	switch(b) {
		case 1:
			y=c;
		    break;
		case 2:
			y=31+c;
			break;
		case 3:
			y=59+c;
			break;
		case 4:
			y=90+c;
			break;
		case 5:
			y=120+c;
			break;
		case 6:
			y=151+c;
			break;
		case 7:
			y=181+c;
			break;
		case 8:
			y=212+c;
			break;
		case 9:
			y=243+c;
			break;
		case 10:
			y=273+c;
			break;
		case 11:
			y=304+c;
			break;
		case 12:
			y=334+c;
		
	}
	printf("\n%d",y);
	return 0;
}