semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(int argc, char* argv[])
{
	int a,b,c,sum;
	scanf ("%d%d%d",&a,&b,&c);
	if (b==1)
	{
		sum=c;
		printf ("%d",sum);
	}
	if (a%4==0&&a%100!=0||a%400==0)
	{
		if (b==2)
		{
			sum=c+31;
			printf ("%d",sum);
		}
		if (b==3)
		{
			sum=c+60;
			printf ("%d",sum);
		}
		if (b==4)
		{
			sum=c+91;
			printf ("%d",sum);
		}
		if (b==5)
		{
			sum=c+121;
			printf ("%d",sum);
		}
		if (b==6)
		{
			sum=c+152;
			printf ("%d",sum);
		}
		if (b==7)
		{
			sum=c+182;
			printf ("%d",sum);
		}
		if (b==8)
		{
			sum=c+213;
			printf ("%d",sum);
		}
		if (b==9)
		{
			sum=c+244;
			printf ("%d",sum);
		}
		if (b==10)
		{
			sum=c+274;
			printf ("%d",sum);
		}
		if (b==11)
		{
			sum=c+305;
			printf ("%d",sum);
		}
		if (b==12)
		{
			sum=c+335;
			printf ("%d",sum);
		}
	}
	else
	{   
		if (b==2)
		{
			sum=c+31;
			printf ("%d",sum);
		}
		if (b==3)
		{
			sum=c+59;
			printf ("%d",sum);
		}
		if (b==4)
		{
			sum=c+90;
			printf ("%d",sum);
		}
		if (b==5)
		{
			sum=c+120;
			printf ("%d",sum);
		}
		if (b==6)
		{
			sum=c+151;
			printf ("%d",sum);
		}
		if (b==7)
		{
			sum=c+181;
			printf ("%d",sum);
		}
		if (b==8)
		{
			sum=c+212;
			printf ("%d",sum);
		}
		if (b==9)
		{
			sum=c+243;
			printf ("%d",sum);
		}
		if (b==10)
		{
			sum=c+273;
			printf ("%d",sum);
		}
		if (b==11)
		{
			sum=c+304;
			printf ("%d",sum);
		}
		if (b==12)
		{
			sum=c+334;
			printf ("%d",sum);
		}
	}
	return 0;
}
int Runnian(int y);
int main(){
	int y,m,d,count=0;
	int i;
	scanf("%d %d %d",&y,&m,&d);
	for(i=1;i<m;i++){
		if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)
			count+=31;
		else if(i==4 || i==6 || i==9 || i==11)
			count+=30;
		else if(i==2){
			if(Runnian(y))
				count+=29;
			else
				count+=28;
		}
	}
	count+=d;
	printf("%d\n",count);
	return 0;
}
int Runnian(int y){
	int result;
	if(y%400==0 || (y%4==0 && y%100!=0))
		result=1;
	else
		result=0;
	return result;
}
int main()
{
int y,m,d,i,x;
scanf("%d%d%d",&y,&m,&d);
x=0;
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)
{x=x+31;}
else if(i==4||i==6||i==9||i==11){x=x+30;}
else if(i==2){x=x+28;}
}}
else
{for(i=1;i<m;i++)
{if(i==1||i==3||i==5||i==7||i==8||i==10)
{x=x+31;}
else if(i==4||i==6||i==9||i==11){x=x+30;}
else if(i==2){x=x+29;}
}}
x=x+d;
printf("%d",x);
return 0;
}
int main()
 
 {
	 int f(int m);	
    
	 int month[5],day[5],year[5],tian[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)
	  {if (month[i]<=2)
	    tian[i]=f(month[i])+day[i];
		else
		tian[i]=f(month[i])+day[i]+1;
		}
	else
	    tian[i]=f(month[i])+day[i];
		printf("%d\n",tian[i]);
	}	
	 return 0;
 }
 int f(int m)
 {      
   int sum;
  switch (m)
  {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 GetMonthDays(int year,int month);
int CheckLeap(int year);//???? 
main()
{
      int year,month,day=1,s=0,i;
      scanf("%d%d%d",&year,&month,&day);
      for(i=1;i<month;i++)
      {
         s+=GetMonthDays(year,i);                    
      }
      s+=day;
      printf("%d",s);
}

int GetMonthDays(int year,int month)//????????? 
{
    int day;
    if(month==4||month==6||month==9||month==11)
         day=30;
    if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
         day=31;
    if(month==2)
    {
      if(CheckLeap(year)==1)
         day=29;//???29? 
      if(CheckLeap(year)==0)
        day=28;//????28? 
    }
    return day;
}

int CheckLeap(int year)//????????? ?????1??????0 
{
    int jugde=0;//??? 
    if(year%100!=0)
    {
      if(year%4==0)
        jugde=1;
    }//????100?????4?????? 
    if(year%100==0)
    {
       if(year%400==0)
         jugde=1;
    }//???100???????400??????? 
    return jugde;//????? 
}
int main(int argc, char* argv[])
{
	int year,month,day;
	scanf("%d%d%d",&year,&month,&day);
    static int days[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; //?????????0??????????0??13??
    if (((year % 4 == 0 && year % 100 !=0 ) || year % 400 == 0) && month == 2 && (day < 1 || day > 29)) 
	{ 
       printf("Illegal input.\n"); 
       return -1; 
	} 
    if (((year % 4 == 0 && year % 100 !=0 ) || year % 400 == 0) && month != 2 && (day < 1 || day > days[month]))
	{ 
       printf("Illegal input.\n"); 
       return -1; 
	} 
    int n = 0;  
    int i; 
    for (i = 1; i < month; i++) 
	{ 
		n += days[i]; 
	} 
	n += day;
	if (month > 2 && ((year % 4 == 0 && year % 100 !=0 ) || year % 400 == 0) ) 
	{
      n++;
	}
	printf("%d", n); 
}
int main ()
{
	int y,m,d;
	int mth[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int leap;
	int sum=0;
	int i;

	cin>>y>>m>>d;
	if((y%400==0) || (y%100!=0) && (y%4==0))
		leap=1;
	else
		leap=0;
	if(leap)
		mth[2]=29;

	for(i=1;i<=m-1;i++)
		sum=sum+mth[i];


	sum=sum+d;

	cout<<sum;
	return 0;
}
int main ()
{
	int y,m,d,D=0,l,s;
	l=31;
	s=30;
	scanf ("%d%d%d", &y, &m, &d);
	if (m==1)
		D=d;
	else if (m==2)
		D=l+d;
	else if (m==3)
		D=l+28+d;
	else if (m==4)
		D=l*2+28+d;
	else if (m==5)
		D=l*2+28+d+s;
	else if (m==6)
		D=s+l*3+28+d;
	else if (m==7)
		D=s*2+l*3+28+d;
	else if (m==8)
		D=s*2+l*4+28+d;
	else if (m==9)
		D=s*2+l*5+28+d;
	else if (m==10)
		D=s*3+l*5+28+d;
	else if (m==11)
		D=s*3+l*6+28+d;
	else
		D=s*4+l*6+28+d;
	if (m>2 && ((y%4==0 && y%100!=0) || (y%400==0)))
	{
		D=D+1;
	}
	printf ("%d\n", D);
	return 0;
}
int main(int argc, char* argv[])
{

	int y,m,d,days=0;
	scanf("%d %d %d",&y,&m,&d);
	switch(m)
	{	
	case 1:days=d;break;
	case 2:days=31+d;break;
	case 3:days=31+28+d;break;
	case 4:days=31+28+31+d;break;
	case 5:days=31+28+31+30+d;break;
	case 6:days=31+28+31+30+31+d;break;
	case 7:days=31+28+31+30+31+30+d;break;
	case 8:days=31+28+31+30+31+30+31+d;	break;
	case 9:days=31+28+31+30+31+30+31+31+d;	break;
	case 10:days=31+28+31+30+31+30+31+31+30+d;break;	
	case 11:days=31+28+31+30+31+30+31+31+30+31+d;break;	
	case 12:days=31+28+31+30+31+30+31+31+30+31+30+d;break;
	}


	/*if((y%4==0&&y%100!=0)||y%400==0)
		days=days+1;
	*/
	printf("%d\n",days);

	return 0;
}
int main()
{
	int year,month,day;
	scanf("%d ",&year);scanf("%d ",&month);scanf("%d",&day);
	if(month==2)
		printf("%d",31+day);
else
	if(month==1)
		printf("%d",day);
	else
	{
		if(month==3)
			day=day+59;
		if(month==4)
			day=day+90;
		if(month==5)
			day=day+120;
		if(month==6)
			day=day+151;
		if(month==7)
			day=day+181;
		if(month==8)
			day=day+212;
		if(month==9)
			day=day+243;
		if(month==10)
			day=day+273;
		if(month==11)
			day=day+304;
		if(month==12)
			day=day+334;
		if(year%4==0 && year %100 !=0 || year %400==0)
			printf("%d",day+1);
		else 
			printf("%d",day);
	}
	return 0;
}
int main()
{
	int year,month,day,number;
	scanf("%d%d%d",&year,&month,&day);
	if (month==1)
		number=day;
	else if (month==2)
		number=31+day;
	else
	{
		if ((year%4==0&&year%100!=0)||year%400==0)
		{
			if (month==3)
				number=60+day;
			else if (month==4)
				number=91+day;
			else if (month==5)
				number=day+121;
			else if (month==6)
				number=day+152;
			else if (month==7)
				number=day+182;
			else if (month==8)
				number=day+213;
			else if (month==9)
				number=day+244;
			else if (month==10)
				number=day+274;
			else if (month==11)
				number=day+305;
			else if (month==12)
				number=day+335;
		}
		else
		{
			if (month==3)
				number=59+day;
			else if (month==4)
				number=90+day;
			else if (month==5)
				number=day+120;
			else if (month==6)
				number=day+151;
			else if (month==7)
				number=day+181;
			else if (month==8)
				number=day+212;
			else if (month==9)
				number=day+243;
			else if (month==10)
				number=day+273;
			else if (month==11)
				number=day+304;
			else if (month==12)
				number=day+334;
		}
	}
	printf("%d\n",number);
	return 0;
}
int main()
{
	int year, month, day;
	cin >> year >> month >> day;
	int a[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
	if( year % 4 == 0 && year % 100 != 0 || year % 400 == 0 )
		a[2] = 29;
	int sum = 0;
	for( int i = 1; i < month; i ++)
	{
		sum = sum + a[i];
	}
	sum = sum + day;
	cout << sum << endl;
	return 0;
}
main()
{
      int y,m,d,i,n=0;
      int a[12];
      a[0]=31;
      a[1]=28;
      a[2]=31;
      a[3]=30;
      a[4]=31;
      a[5]=30;
      a[6]=31;
      a[7]=31;
      a[8]=30;
      a[9]=31;
      a[10]=30;
      a[11]=31;
      scanf("%d %d %d",&y,&m,&d);
      if (y%4==0 && y%100 != 0) a[1]=29;
      if (y%400==0) a[1]=29;
      
      for (i=0;i<m-1;i++) n+= a[i];
      n=n+d;
      printf("%d",n);
      
}
void main()
{
	int year,month,day,n,i,j;
	for(j=1;j<=5;j++)
	{
	n=0;
		scanf("%d %d %d",&year,&month,&day);
	if((year % 4 == 0 && year % 100 !=0 ) || year % 400 == 0)
	{
		int days[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 
		for (i = 0; i < month-1; i++) 
		{ 
			n += days[i]; 
		}
		n+=day;
	}
	else
	{
	    int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 
        for (i = 0; i < month-1; i++) 
		{ 
			n += days[i]; 
		}
		n+=day;
	}
	printf("%d\n",n);
	}
}
int main(int argc, char* argv[])
{
	int year,month,day;
	int sum=0;
	scanf("%d%d%d",&year,&month,&day);
	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+31+day;break;
	}
    if(month>2&&((year%4==0&&year%100!=0)||year%400==0))sum=sum+1;
	printf("%d",sum);
	return 0;
}
int main()
{
	int a,b,c,x;
    scanf ("%d%d%d",&a,&b,&c);
		
	
	 if (b==1) x=c;
	 if (b==2) x=31+c;
     if (b==3) x=31+28+c;
     if (b==4) x=31+28+31+c;
     if (b==5) x=31+28+31+30+c;
     if (b==6) x=31+28+31+30+31+c;
     if (b==7) x=31+28+31+30+31+30+c;
     if (b==8) x=31+28+31+30+31+30+31+c;
     if (b==9) x=31+28+31+30+31+30+31+31+c;
     if (b==10) x=31+28+31+30+31+30+31+31+30+c;
     if (b==11) x=31+28+31+30+31+30+31+31+30+31+c;
     if (b==12) x=31+28+31+30+31+30+31+31+30+31+30+c;

	if (b<=2) printf("%d\n",x);
	else
		if (a%4==0)
			if (a%100==0)
				if (a%400==0)
					printf("%d\n",x+1);
				else
					printf("%d\n",x);
			else
				printf("%d\n",x+1);
		else 
			printf("%d\n",x);
		return 0;
}
int main()
{
int year,month,date;
int day=0;
cin>>year>>month>>date;
if((year%400==0)||((year%4==0)&&(year%100!=0)))
{
	int a[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	for(int i=1;i<=(month-1);i++)
	{day+=a[i];}
	day+=date;
}
else
{
	int b[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    for(int i=1;i<=(month-1);i++)
		day+=b[i];
	day+=date;
}
cout<<day<<endl;
return 0;
}
int leapyear(int year){
	if(year%400==0||(year%4==0&&year%100!=0))
		return 1;
	else
		return 0;
}
int whichday(int year,int month,int day){
	int mon[MONTH]={31,28,31,30,31,30,31,31,30,31,30,31};
	int d=0,i;
	if(leapyear(year)==1)
		mon[1]++;
	for(i=0;i<month-1;i++)
		d+=mon[i];
	d+=day;
	return d;
}
int main(){
	int year,month,day;
	int d;
	scanf("%d%d%d",&year,&month,&day);
	d=whichday(year,month,day);
	printf("%d",d);
}
int main(int argc, char* argv[])
{
	int day,month,year;
	scanf("%d%d%d",&year,&month,&day);
	if((year%4==0 && year%100!=0)||(year%400==0))
	{
        switch(month)
		{
		    case 1:
				{
				    day=day;
				    break;
				}
		    case 2:
				{
				    day=day+31;
				    break;
				}
	        case 3:
				{
				    day=day+31+29;
				    break;
				}
			case 4:
				{
					day=day+31+29+31;
					break;
				}
			case 5:
				{
					day=day+31+29+31+30;
					break;
				}
			case 6:
				{
					day=day+31+29+31+30+31;
					break;
				}
			case 7:
				{
					day=day+31+29+31+30+31+30;
					break;
				}
			case 8:
				{
					day=day+31+29+31+30+31+30;
					break;
				}
			case 9:
				{
					day=day+31+29+31+30+31+30+31;
					break;
				}
			case 10:
				{
					day=day+31+29+31+30+31+30+31+30;
					break;
				}
			case 11:
				{
					day=day+31+29+31+30+31+30+31+30;
					break;
				}
			case 12:
				{
					day=day+31+29+31+30+31+30+31+30+31;
					break;
				}
		}
	}
	else
	{
		switch(month)
		{
		    case 1:
				{
					day=day;
					break;
				}
			case 2:
				{
					day=day+31;
					break;
				}
			case 3:
				{
					day=day+31+28;
					break;
				}
			case 4:
				{
					day=day+31+28+31;
					break;
				}
			case 5:
				{
					day=day+31+28+31+30;
					break;
				}
			case 6:
				{
					day=day+31+28+31+30+31;
					break;
				}
			case 7:
				{
					day=day+31+28+31+30+31+30;
					break;
				}
			case 8:
				{
					day=day+31+28+31+30+31+30+31;
					break;
				}
			case 9:
				{
					day=day+31+28+31+30+31+30+31+31;
					break;
				}
			case 10:
				{
					day=day+31+28+31+30+31+30+31+31+30;
					break;
				}
			case 11:
				{
					day=day+31+28+31+30+31+30+31+31+30+31;
					break;
				}
			case 12:
				{
					day=day+31+28+31+30+31+30+31+31+30+31+30;
					break;
				}
		}
	}
	printf("%d\n",day);
	return 0;
}
main(){
  int year,month,date,i=1,sum=0;
  scanf("%d%d%d",&year,&month,&date);
  
  
  for(i=1;i<=month-1;i++)
  {    
	  if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
		sum+=31;
     
	  else if(i==2)
	 {
		 if (year%4==0&&year%100!=0||year%400==0)
		 {
			 sum+=29;
		 }
		 else 
			 sum+=28;
	 }
	 else {
		 sum+=30;
	 }
	  
  }

   sum+=date;
	  printf("%d",sum);
	 
  return 0;
}
int month[2][12]={31,28,31,30,31,30,31,30,31,31,30,31,
                  31,29,31,30,31,30,31,30,31,31,30,31};
int main()
{
    int year,monthq,day;
    cin>>year>>monthq>>day;
    int ans=0;
    for(int i=1;i<monthq;i++)
    {
            int xx;
            if(year%400==0 || (year%4==0 && year%100!=0))
             xx=1;
            else xx=0;
            ans+=month[xx][i-1];
    }
    ans+=day;
    cout<<ans<<endl;
    return 0;
}
int leap(int year)
{
	if(((year%4==0)&&(year%100!=0))||(year%400==0))
		return(1);
	else 
		return(0);
}
void main()
{
	int year,month,day,leap1,answer=0,i;
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	scanf("%d %d %d",&year,&month,&day);
    leap1=leap(year);
    if(leap1==1)
	{
	    for(i=1;i<month;i++)
		{
			answer+=b[i];
		}
		answer+=day;
	}
	else
	{
		for(i=1;i<month;i++)
		{
			answer+=a[i];
		}
		answer+=day;
	}
	printf("%d",answer);
}
int main()
{ int y,m,d,a[5],i=1;
  while(i<=5)
  {
  scanf("%d%d%d",&y,&m,&d);
  if(y%4!=0||y%100==0&&y%400!=0)
  { switch(m){
    case 1:a[i]=d;break;
    case 2:a[i]=d+31;break;
	case 3:a[i]=d+31+28;break;
    case 4:a[i]=d+62+28;break;
	case 5:a[i]=d+62+28+30;break;
	case 6:a[i]=d+31*3+30+28;break;
	case 7:a[i]=d+31*3+30*2+28;break;
    case 8:a[i]=d+31*4+30*2+28;break;
	case 9:a[i]=d+31*5+30*2+28;break;
	case 10:a[i]=d+31*5+30*3+28;break;
	case 11:a[i]=d+31*6+30*3+28;break;
	case 12:a[i]=d+31*6+30*4+28;break;}
		}
   else switch(m){
    case 1:a[i]=d;break;
    case 2:a[i]=d+31;break;
	case 3:a[i]=d+31+29;break;
    case 4:a[i]=d+62+29;break;
	case 5:a[i]=d+62+29+30;break;
	case 6:a[i]=d+31*3+30+29;break;
	case 7:a[i]=d+31*3+30*2+29;break;
    case 8:a[i]=d+31*4+30*2+29;break;
	case 9:a[i]=d+31*5+30*2+29;break;
	case 10:a[i]=d+31*5+30*3+29;break;
	case 11:a[i]=d+31*6+30*3+29;break;
	case 12:a[i]=d+31*6+30*4+29;break;}
   i=i+1;
  }
   printf("%d\n%d\n%d\n%d\n%d\n%",a[1],a[2],a[3],a[4],a[5]);
   return 0;
}
int main()
{
	int i, year, month, day, n = 0;
	cin >> year >> month >> day;
	int pin[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    int run[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	if((year % 4 == 0 && year % 100 !=  0) || year % 400 == 0)
	{
		if(month >= 2)
		{
			for(i = 0; i <= month - 2; i++)
			{
		    	n = n + run[i];
			}
			n = n + day;
		}
		if(month == 1)
		{
			n = day;
		}
	}		 
	else
	{
		if(month >= 2)
		{
			for(i = 0; i <= month - 2; i++)
			{
		    	n = n + pin[i];
			}
			n = n + day;
		}
		if(month == 1)
		{
			n = day;
		}		
	}
	cout << n << endl;
	return 0;
}
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	int sum=0;
	int i;
	int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int n[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	if (a%4!=0)
	{
		if (b==1)
		{
			cout<<c<<endl;
		}
		if (b>1){
		for (i=0;i<b-1;i++)
			sum=sum+m[i];
		sum=sum+c;
		cout<<sum<<endl;}
	}

	if (a%4==0) {
		if (a%100!=0){
		if (b==1)
			cout<<c<<endl;
		if (b>1){
		for (i=0;i<b-1;i++)
			sum=sum+n[i];
		sum=sum+c;
		cout<<sum<<endl;
	}}
	if (a%100==0&&a%400!=0)
	{
		if (b==1)
				{
					cout<<c<<endl;
				}
				if (b>1){
				for (i=0;i<b-1;i++)
					sum=sum+m[i];
				sum=sum+c;
				cout<<sum<<endl;}
	}
	if (a%400==0)
	{
		if (b==1)
					cout<<c<<endl;
				if (b>1){
				for (i=0;i<b-1;i++)
					sum=sum+n[i];
				sum=sum+c;
				cout<<sum<<endl;
			}
	}
	}
	return 0;
}
int main(int argc, char* argv[])
{
    int x,y,z;
    scanf("%d%d%d",&x,&y,&z);
    int s[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int m=0;
    int n=0;
    for(m=0;m<y-1;m++)
        n+=s[m];
    int D;
    if(((x%4==0&&x%100!=0||x%400==0)&&y!=1&&y!=2))
        D=n+z+1;
    else
        D=n+z;
    printf("%d",D);
    return 0;
}
int main(int argc, char* argv[])
{
	int a,b,c,d;
	scanf("%d %d %d",&a,&b,&c);
	if(a%4==0&&a%100!=0||a%400==0)
	{
			switch(b)
		{
			case 1:
				d=c;
				break;
			case 2:
				d=31+c;
                break;
			case 3:
				d=60+c;
				break;
			case 4:
				d=91+c;
				break;
			case 5:
				d=121+c;
				break;
			case 6:
				d=152+c;
				break;
			case 7:
				d=182+c;
				break;
			case 8:
				d=213+c;
				break;
			case 9:
				d=244+c;
				break;
			case 10:
				d=274+c;
				break;
			case 11:
				d=305+c;
				break;
			case 12:
				d=335+c;
				break;
		}
			printf("%d",d);
	}
		else
		{
			switch(b)
		{
			case 1:
				d=c;
				break;
			case 2:
				d=31+c;
				break;
			case 3:
				d=59+c;
				break;
			case 4:
				d=90+c;
				break;
			case 5:
				d=120+c;
				break;
			case 6:
				d=151+c;
				break;
			case 7:
				d=181+c;
				break;
			case 8:
				d=212+c;
				break;
			case 9:
				d=243+c;
				break;
			case 10:
				d=273+c;
				break;
			case 11:
				d=304+c;
				break;
			case 12:
				d=334+c;
				break;
		}
		printf("%d",d);
		}
	return 0;
}
int main()
{
	int a,b,c,d;
	scanf("%d%d%d",&a,&b,&c);
	if(b==1)
	{
		d=c;
	}
	if(b==2)
	{
		d=c+31;
	}
	if(b==3)
	{
		d=c+31+28;
	}
	if(b==4)
	{
		d=c+59+31;
	}
	if(b==5)
	{
		d=c+90+30;
	}
	if(b==6)
	{
		d=c+120+31;
	}
	if(b==7)
	{
		d=c+151+30;
	}
	if(b==8)
	{
		d=c+181+31;
	}
	if(b==9)
	{
		d=c+212+31;
	}
	if(b==10)
	{
		d=c+243+30;
	}
	if(b==11)
	{
		d=c+273+31;
	}
	if(b==12)
	{
		d=c+304+30;
	}
	if(a%100==0)
	{
		if(a%400==0)
		{
			if(b!=1&&b!=2)
			{
				d=d+1;
			}
		}
	}
	else if(a%100!=0&&a%4==0)
	{
		if(b!=1&&b!=2)
		{
			d=d+1;
		}
	}
	printf("%d",d);
	return 0;
}
int main()
{
	int year[5],month[5],day[5],l[5]={0},i=0;
	for(i=0;i<5;i++)
	{
	scanf("%d%d%d",&year[i],&month[i],&day[i]);
	}
	for(i=0;i<5;i++)
	{
    if((year[i]%4==0)&&(year[i]%100!=0)||(year[i]%400==0))
	{
		switch(month[i])
		{
		    case 12: l[i]=l[i]+30;
            case 11: l[i]=l[i]+31;
            case 10: l[i]=l[i]+30;
            case 9:  l[i]=l[i]+31;
            case 8:	 l[i]=l[i]+31;
            case 7:  l[i]=l[i]+30;
            case 6:  l[i]=l[i]+31;
            case 5:  l[i]=l[i]+30;
            case 4:  l[i]=l[i]+31;
            case 3:  l[i]=l[i]+29;
            case 2:  l[i]=l[i]+31;
            case 1:  l[i]=l[i];
		}
	}
    else
	{
        switch(month[i])
		{
		    case 12: l[i]=l[i]+30;
            case 11: l[i]=l[i]+31;
            case 10: l[i]=l[i]+30;
            case 9:  l[i]=l[i]+31;
            case 8:	 l[i]=l[i]+31;
            case 7:  l[i]=l[i]+30;
            case 6:  l[i]=l[i]+31;
            case 5:  l[i]=l[i]+30;
            case 4:  l[i]=l[i]+31;
            case 3:  l[i]=l[i]+28;
            case 2:  l[i]=l[i]+31;
            case 1:  l[i]=l[i];
		}
	}
	l[i]=l[i]+day[i];
	}
	for(i=0;i<5;i++)
		printf("%d\n",l[i]);
	return 0;
}
int main(int argc, char* argv[])
{
	int year, month, day, x;
	scanf("%d%d%d",&year,&month,&day);
	if((year%4==0&&year%100!=0)||(year%400==0))
	{	
		if (month==1)
	    x=day;
	else if(month==2)
		x=31+day;
	else if(month==3) 
		x=31+29+day;
	else if (month==4)
		x=31+29+31+day;
	else if(month==5)
		x=31+29+31+30+day;
	else if(month==6)
		x=31+29+31+30+31+day;
	else if (month==7)
		x=31+29+31+30+31+30+day;
	else if (month==8)
		x=31+29+31+30+31+30+31+day;
	else if(month==9)
		x=31+29+31+30+31+30+31+31+day;
	else if (month==10)
		x=31+29+31+30+31+31+30+31+30+day;
	else if(month==11)
		x=31+29+31+30+31+30+31+31+30+31+day;
	else if(month==12)
		x=31+29+30+30+31+30+31+31+30+31+30+day;
	}
	else 
	{	
		if (month==1)
	    x=day;
	else if(month==2)
		x=31+day;
	else if(month==3) 
		x=31+28+day;
	else if (month==4)
		x=31+28+31+day;
	else if(month==5)
		x=31+28+31+30+day;
	else if(month==6)
		x=31+28+31+30+31+day;
	else if (month==7)
		x=31+28+31+30+31+30+day;
	else if (month==8)
		x=31+28+31+30+31+30+31+day;
	else if(month==9)
		x=31+28+31+30+31+30+31+31+day;
	else if (month==10)
		x=31+28+31+30+31+31+30+31+30+day;
	else if(month==11)
		x=31+28+31+30+31+30+31+31+30+31+day;
	else if(month==12)
		x=31+28+30+30+31+30+31+31+30+31+30+day;
	}

	printf("%d\n",x);
    return 0;
}
int main(int argc, char* argv[])
{   
	int a,b,c,d;
	scanf("%d%d%d",&a,&b,&c);
    if (((a%4==0)&&(a%100)!=0)||(a%400==0))
	{  
	  if (b==1)
	  {d=c;}
	  else if (b==2)
	  {d=31+c;}
	  else if (b==3)
	  {d=60+c;}
	  else if (b==4)
	  {d=91+c;}
	  else if (b==5)
	  {d=121+c;}
	  else if (b==6)
	  {d=152+c;}
	  else if (b==7)
	  {d=182+c;}
	  else if (b==8)
	  {d=213+c;}
	  else if (b==9)
	  {d=244+c;}
	  else if (b==10)
	  {d=274+c;}
	  else if (b==11)
	  {d=305+c;}
	  else if (b==12)
	  {d=335+c;}


	}
	else
	{  
	  if (b==1)
	  {d=c;}
	  else if (b==2)
	  {d=31+c;}
	  else if (b==3)
	  {d=59+c;}
	  else if (b==4)
	  {d=90+c;}
	  else if (b==5)
	  {d=120+c;}
	  else if (b==6)
	  {d=151+c;}
	  else if (b==7)
	  {d=181+c;}
	  else if (b==8)
	  {d=212+c;}
	  else if (b==9)
	  {d=243+c;}
	  else if (b==10)
	  {d=273+c;}
	  else if (b==11)
	  {d=304+c;}
	  else if (b==12)
	  {d=334+c;}
		
	}

	printf("%d\n",d);
	return 0;
}
void main()
{
	int year,month,day;
	int n;
	int a=0;
	scanf("%d %d %d",&year,&month,&day);
	if((year%4==0&&year%100!=0)||year%400==0)
		a=1;
	if(month==1)
		n=day;
	if(month==2)
		n=31+day;
	if(month==3)
		n=59+day;
	if(month==4)
		n=90+day;
	if(month==5)
		n=120+day;
	if(month==6)
		n=151+day;
	if(month==7)
		n=181+day;
	if(month==8)
		n=212+day;
	if(month==9)
		n=243+day;
	if(month==10)
		n=273+day;
	if(month==11)
		n=304+day;
	if(month==12)
		n=334+12;
	if(month>2&&a==1)
		n++;
	printf("%d",n);
}