semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int year,month,day,n;
	scanf("%d%d%d",&year,&month,&day);
	if(month==1)
	{
		n=day;
	}
	else if(month==2)
	{
		n=31+day;
	}
	else if((year%4!=0||year%100==0)&&year%400!=0)
	{
		if(month<8)
		{
					if(month%2==0)
					{
						n=31*(month-1)-2-month/2+day;
					}
					else
					    n=31*(month-1)-2-(month-1)/2+day;
		}
		else
			if(month%2==0)
			{
				n=31*4+28+30*2+(month-8)*31-(month/2-5)+day;
			}
			else
				n=31*4+28+60+(month-8)*31-((month-1)/2-4)+day;
	}
	else
			if(month<8)
		{
					if(month%2==0)
					{
						n=31*(month-1)-1-month/2+day;
					}
					else
					    n=31*(month-1)-1-(month-1)/2+day;
		}
		else
			if(month%2==0)
			{
				n=31*4+29+30*2+(month-8)*31-(month/2-5)+day;
			}
			else
				n=31*4+29+60+(month-8)*31-((month-1)/2-4)+day;
			printf("%d\n",n);
	return 0;
}
int main()
{
	int y,m,d,x=0,i;
	int a[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int b[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d",&y);
	scanf("%d",&m);
	scanf("%d",&d);
	if((y%400==0)||(y%100!=0&&y%4==0))
		for(i=0;i<m-1;i++)
			x=x+a[i];
	else
		for(i=0;i<m-1;i++)
			x=x+b[i];
	x=x+d;
	printf("%d",x);
}
void main()
{
	int a,b,c,i=1,n,x=0;

	
	
    int f[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};   
	int isleapyear(int a);
	while(x<=4)
	{
	    scanf("%d %d %d",&a,&b,&c);
		n=0;
		

	
	    for(i=1;i<b;i++)
		{
			

			n+=f[i];
		}
		
		   
		
	     n+=c;
	   if(b>2&&isleapyear(a))
		    n+=1;
	        
	    printf("%d\n",n);
		x++;
    }
	
}
int isleapyear(int a)
	{
		return((a%4==0&&a%100!=0)||(a%400==0));
		
	}
int main()
{
	int i,year,month,day,date=0;
	scanf("%d%d%d",&year,&month,&day);
	for (i=1;i<month;i++)
	{
		if (i==4 ||i==6 ||i==9 ||i==11)
			date=date+30;
		else
		{
			if (i==2)
			{
				if (year%100!=0 && year%4==0 || year%400==0)
					date=date+29;
				else 
					date=date+28;
			}
			else
				date=date+31;
		}
	}
	date =date+day;
	printf("%d\n",date);
	return 0;
}
int main()
{
	int y,m,d,num;
	scanf ("%d %d %d",&y,&m,&d);
	switch (m)
	{
	case 1:num=d;break;
	case 2:num=31+d;break;
	case 3:num=59+d;break;
	case 4:num=90+d;break;
	case 5:num=120+d;break;
	case 6:num=151+d;break;
	case 7:num=181+d;break;
	case 8:num=212+d;break;
	case 9:num=243+d;break;
	case 10:num=273+d;break;
	case 11:num=304+d;break;
	case 12:num=334+d;break;
	}
	if (((y%4==0&&y%100!=0)||(y%400==0))&&(m>2))
		num=num+1;
         printf("%d\n",num);
	return 0;
}
int main()
{
	int Day1[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int Day2[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int year,month,day;
	int sumday=0;
	int i,j;
	
	cin >> year >> month >> day;
	if((year%400==0)||(year%4==0&&year%100!=0))
		j=1;
	else
		j=0;
	if(j==1)
	{
	     if(month==1)
		 cout << day << endl;
        	if(month>1)
	      {
		     for(i=0;i<month-1;i++)
			 {sumday=sumday+Day2[i];}
	        	sumday=sumday+day;
		     cout << sumday << endl;
	      }
	}
			if(j==0)
			{
				
	               if(month==1)
		          cout << day << endl;
        	        if(month>1)
	              {
		              for(i=0;i<month-1;i++)
					  {sumday=sumday+Day1[i];}
	                	sumday=sumday+day;
		              cout << sumday << endl;
	              }
				
			}
	return 0;
}
int main(int argc, char* argv[])
{
	int year,month,day,n;
	int m=0;
	scanf("%d %d %d",&year,&month,&day);
	if (year%4==0)
		if (year%100==0)
			if (year%400==0)
				n=29;
			else
				n=28;
		else
			n=29;
	else 
		n=28;
	if (month==1)
	{
		printf("%d",day);
		return 0;
	}
	if (month==2)
	{
		m=31+day;
		printf("%d",m);
		return 0;
	}
	if (month==3)
	{
		m=31+n+day;
		printf("%d",m);
		return 0;
	}
	if (month==4)
	{
		m=31+n+31+day;
		printf("%d",m);
		return 0;
	}
	if (month==5)
	{
		m=31+n+31+30+day;
		printf("%d",m);
		return 0;
	}
	if (month==6)
	{
		m=31+n+31+30+31+day;
		printf("%d",m);
		return 0;
	}
	if (month==7)
	{
		m=31+n+31+30+31+30+day;
		printf("%d",m);
		return 0;
	}
	if (month==8)
	{
		m=31+n+31+30+31+30+31+day;
		printf("%d",m);
		return 0;
	}
	if (month==9)
	{
		m=31+n+31+30+31+30+31+31+day;
		printf("%d",m);
		return 0;
	}
	if (month==10)
	{
		m=31+n+31+30+31+30+31+31+30+day;
		printf("%d",m);
		return 0;
	}
	if (month==11)
	{
		m=31+n+31+30+31+30+31+31+30+31+day;
		printf("%d",m);
		return 0;
	}
	if (month==12)
	{
		m=31+n+31+30+31+30+31+31+30+31+30+day;
		printf("%d",m);
		return 0;
	}
	return 0;
	}
//
//  main.cpp
//  The number of the date
//
//  Created by Jas-Cassie on 13-12-15.
//  Copyright (c) 2013? Jas-Cassie. All rights reserved.
//

int main()
{
    int y,m,d;
    int i=0,num=0;
    cin >> y >> m >> d;
    if( y % 4 == 0 && (y % 100 != 0 || (y % 400 == 0)))
    {
        //cout<<"1"<<endl;
        int a[13] = {31,29,31,30,31,30,31,31,30,31,30,31};
        for( i = 0 ; i < m-1 ; i ++ )
            num += a[i];
        num += d;
    }
    else
    {
        //cout<<"2"<<endl;
        int a[13] = {31,28,31,30,31,30,31,31,30,31,30,31};
        for( i = 0 ; i < m-1 ; i ++ )
            num += a[i];
        num = num + d;
    }
    cout << num <<endl;
    return 0;
}
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 m[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	    int i;
	    int k=0;
	    for(i=0;i<(b-1);i++)
		{
		  k=k+m[i];
		}
	k=k+c;
	printf("%d",k);
	}
	else
	{
		int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	    int i;
	    int k=0;
	    for(i=0;i<(b-1);i++)
		{
		  k=k+m[i];
		}
	    k=k+c;
	    printf("%d",k);
	}
	return 0;
}
int main()
{
	int a,b,c;
	scanf("%d %d %d", &a,&b,&c);
	if (((a%4==0) && (a%100!=0))||(a%400==0)){
		switch (b){
		case 1: {printf("%d", c);break;}
		case 2: {printf("%d", c+31);break;}
		case 3: {printf("%d", c+60);break;}
		case 4: {printf("%d", c+91);break;}
		case 5: {printf("%d", c+121);break;}
		case 6: {printf("%d", c+152);break;}
		case 7: {printf("%d", c+182);break;}
		case 8: {printf("%d", c+213);break;}
		case 9: {printf("%d", c+243);break;}
		case 10: {printf("%d", c+273);break;}
		case 11: {printf("%d", c+305);break;}
		case 12: {printf("%d", c+335);}
		}
	}
	else {
		switch (b){
		case 1: {printf("%d", c);break;}
		case 2: {printf("%d", c+31);break;}
		case 3: {printf("%d", c+59);break;}
		case 4: {printf("%d", c+90);break;}
		case 5: {printf("%d", c+120);break;}
		case 6: {printf("%d", c+151);break;}
		case 7: {printf("%d", c+181);break;}
		case 8: {printf("%d", c+212);break;}
		case 9: {printf("%d", c+243);break;}
		case 10: {printf("%d", c+273);break;}
		case 11: {printf("%d", c+304);break;}
		case 12: {printf("%d", c+334);}
		}
	}
	return 0;
}
int isRunNian(int year){
	int result;
	if(year%400 == 0 ||(year%4==0 && year%100!=0)){
		result = 1;
	} else{
		result = 0;
	}
      return result;	
}

int DiJiTian(int year, int month, int day){
	int result = 0;
	for(int i = 1; i < month; i++){ 	
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12){
			result += 31;	
		} else if (i == 4 || i ==6 || i == 9 || i==11){
			result += 30;
		} else if(i == 2){
			if(isRunNian(year)){
				result += 29;
			} else {
				result += 28;
			}	
		}
	}
	result += day;
	return result;	
}
int main()
{
    int year,month,day,Y;
	scanf("%d%d%d",&year,&month,&day);
	Y=DiJiTian(year,month,day);
	printf("%d",Y);
	return 0;
}
int main()
{
	int year,month,day;
	int result;
	scanf("%d %d %d",&year,&month,&day);
	result=(month-1)*30+day;
	if(month==1)
	{printf("%d",result);}
	else
	{
		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;}
    	if((year%4==0&&year%100!=0)||(year%400==0))
		{	printf("%d",result);}
    	else
		{printf("%d",result-1);}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int a,b,c,x=0,i;
	scanf("%d%d%d",&a,&b,&c);	
	for(i=1;i<b;i++)
		{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)	
		{x=x+31;}
		else if(i==2){
		x=x+28;}
		else
		x=x+30;
	}
	if(((a%4==0)&&(a%100!=0)||(a%400==0))&&(b>2)){
	x=x+1;}
	x=x+c;
	printf("%d\n",x);
	return 0;
}
int run(int nian)
{
	if (nian%400==0)
		return 1;
	else
		if (nian%100==0)
			return 0;
		else
			if (nian%4==0)
				return 1;
			else
				return 0;
}

int mon(int m,int n)
{
	switch (m)
	{
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:
	case 10:
		return 31;
	case 4:
	case 6:
	case 9:
	case 11:
		return 30;
	default:
		if (run(n))
			return 29;
		else
			return 28;
	}
}


int main()
{
	int year,month,day,date,i;
	scanf("%d %d %d",&year,&month,&day);
	date=0;
	for (i=1;i<month;i++)
		date=date+mon(i,year);
	date=date+day;
	printf("%d",date);
	return 0;
}
int main(int argc, char* argv[])
{
	int y,m,d;
	scanf("%d%d%d",&y,&m,&d);
	if((y%4==0&&y%100!=0)||y%400==0)
	{
		if(m==1)
			printf("%d",d);

if(m==2)
			printf("%d",d+31);
if(m==3)
			printf("%d",d+31+29);
if(m==4)
			printf("%d",d+31+29+31);
if(m==5)
			printf("%d",d+31+29+31+30);
			if(m==6)
				printf("%d",d+31+29+31+30+31);
			if(m==7)
				printf("%d",d+31+29+31+30+31+30);
			if(m==8)
				printf("%d",d+31+29+31+30+31+30+31);
			if(m==9)
				printf("%d",d+31+29+31+30+31+30+31+31);
			if(m==10)
				printf("%d",d+31+29+31+30+31+30+31+31+30);
			if(m==11)
				printf("%d",d+31+29+31+31+30+30+31+31+30+31);
			if(m==12)
				printf("%d",d+31+29+31+31+30+30+31+31+30+31+30);
	}
	else
	{
	if(m==1)
			printf("%d",d);

if(m==2)
			printf("%d",d+31);
if(m==3)
			printf("%d",d+31+28);
if(m==4)
			printf("%d",d+31+28+31);
if(m==5)
			printf("%d",d+31+29+30+30);
			if(m==6)
				printf("%d",d+31+29+31+30+30);
			if(m==7)
				printf("%d",d+31+29+31+30+30+30);
			if(m==8)
				printf("%d",d+31+29+31+30+31+30+30);
			if(m==9)
				printf("%d",d+31+29+31+30+31+30+31+30);
			if(m==10)
				printf("%d",d+31+29+31+30+31+30+31+31+29);
			if(m==11)
				printf("%d",d+31+29+31+31+30+30+31+31+30+30);
			if(m==12)
				printf("%d",d+31+29+31+31+30+30+31+31+30+31+29);
	}
	return 0;
}
int main()
{
	int year,month,day;
	scanf("%d%d%d",&year,&month,&day);
	int sum=0,i;
	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(i==2)
		{
			if(year%400==0||(year%4==0&&year%100!=0))
				sum+=29;
			else
				sum+=28;
		}
	}
	sum+=day;
	printf("%d\n",sum);
	return 0;
}
int main(){
	int year,month,day,x;
	int a2;
	scanf("%d %d %d",&year,&month,&day);
	if(year%4==0&&year%100!=0)
	{a2=29;}
	else
	{a2=28;}
	
	switch(month){
	case 1:
		x=day;
		printf("%d",x);
		break;
	case 2:
		x=a1+day;
		printf("%d",x);
		break;
    case 3:
		x=a1+a2+day;
		printf("%d",x);
		break;
    case 4:
		printf("%d",x);
        x=a1+a2+a3+day;
		break;
    case 5:
		x=a1+a2+a3+a4+day;
		printf("%d",x);
		break;
    case 6:
		x=a1+a2+a3+a4+a5+day;
		printf("%d",x);
        break;
    case 7:
		x=a1+a2+a3+a4+a5+a6+day;
		printf("%d",x);
		break;
    case 8:
		x=a1+a2+a3+a4+a5+a6+a7+day;
		printf("%d",x);
		break;
    case 9:
		x=a1+a2+a3+a4+a5+a6+a7+a8+day;
		printf("%d",x);
		break;
    case 10:
		x=a1+a2+a3+a4+a5+a6+a7+a8+a9+day;
		printf("%d",x);
		break;
    case 11:
		x=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+day;
		printf("%d",x);
		break;
    case 12:
		x=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+day;
		printf("%d",x);
		break;
	}

	return 0;
}
int main()
{
	int A,B,C,a,b,c,d,e,f,g,h,i,j,k,l,m;
	scanf("%d%d%d",&A,&B,&C);
	a=31;
	if((A%4==0 && A%100!=0) || A%400==0)
			b=29;
	else
		b=28;
	c=31;
	d=30;
	e=31;
	f=30;
	g=31;
	h=31;
	i=30;
	j=31;
	k=30;
	l=31;
	if(B==1)
		m=C;
    if(B==2)
		m=C+a;
	if(B==3)
		m=C+a+b;
	if(B==4)
		m=C+a+b+c;
	if(B==5)
		m=C+a+b+c+d;
	if(B==6)
		m=C+a+b+c+d+e;
    if(B==7)
		m=C+a+b+c+d+e+f;
    if(B==8)
		m=C+a+b+c+d+e+f+g;
    if(B==9)
		m=C+a+b+c+d+e+f+g+h;
    if(B==10)
		m=C+a+b+c+d+e+f+g+h+i;
    if(B==11)
		m=C+a+b+c+d+e+f+g+h+i+j;
    if(B==12)
		m=C+a+b+c+d+e+f+g+h+i+j+k;
	printf("%d\n",m);
	return 0;
}
int main()
{
	int y,m,x,i,sum=0;
	scanf("%d%d%d",&y,&m,&x);
   if(y%4==0&&y%100!=0||y%400==0)
	{
		int d[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
		for(i=0;i<m;i++)
		{
			sum=sum+d[i];
		}
	   
	
		printf("%d",sum+x);
	}
	else
	{
       int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	   for(i=0;i<m;i++)
	   {
		   sum=sum+d[i];
	  
	   }
    
	   printf("%d",sum+x);
	}
	return 0;
}
int main()
{
	int year,month,day,c,days=0,i;
	int M[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;
	if((year%4==0&&year%100!=0)||(year%400==0))
		c=1;
	else 
		c=0;
	if(month==1)
		cout<<day;
	else
	{
		for(i=0;i<month-1;i++)
		   days+=M[c][i];
		cout<<days+day;
	}
	return 0;
}
main()
{
int year,month,day,sum,a[13];
scanf("%d %d %d",&year,&month,&day);
a[1]=31;
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;
         if((year%100!=0&&year%4==0)||(year%400==0))
         a[2]=29;
         else a[2]=28;
sum=day;
for(int i=1;i<month;i++)
sum=sum+a[i];
printf("%d",sum);
getchar();
getchar();
}
main()
{
	int year,month,day,a,m[12]={31,28,31,30,31,30,31,31,30,31,30,31},i,sum=0;
	scanf("%d %d %d",&year,&month,&day);
	if(year%4==0&&year%100!=0)
		a=1;
	else if(year%100==0&&year%400==0)
		a=1;
	else
		a=0;
	if(a==1)
	{
		m[1]=29;
		for(i=0;i<month-1;i++)
			sum=sum+m[i];
		sum=sum+day;
	}
	else if(a==0)
	{
		for(i=0;i<month-1;i++)
			sum=sum+m[i];
		sum=sum+day;
	}
	printf("%d\n", sum);
}
int main()
{
	int i,y,m,d,D;
	int total=0;
	
	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)
		{
			total=total+31;
		}
	     else if(i==4||i==6||i==9||i==11)
		{
			total=total+30;
		}
		else
		{
			if(y%4==0&&y%100!=0||y%400==0)
			{
				total=total+29;
			}
			else
			{
				total=total+28;
			}
		}
	}
	D=total+d;
	printf("%d",D);
	return 0;
}
int main()
{
	int year,month,day,i,y=0,days,w;
	scanf("%d%d%d",&year,&month,&days);
	for(i=1;i<month;i++){
       if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
		   day=31;
	   else
		   if(i==4||i==6||i==9||i==11)
			   day=30;
		   else
			   if(i==2){
			   if(year%4==0&&year%100!=0||year%400==0)
				   day=29;
			   else
				   day=28;
			   }
       y=y+day;
	   }
	w=y+days;
	printf("%d\n",w);
	return 0;
}
int main() 
{ 
int nian,yue,ri,leap,sum; 
scanf("%d%d%d",&nian,&yue,&ri); 
switch(yue) 
{ 
case 1:sum=0; 
break; 
case 2:sum=31; 
break; 
case 3:sum=59; 
break; 
case 4:sum=90; 
break; 
case 5:sum=120; 
break; 
case 6:sum=151; 
break; 
case 7:sum=181; 
break; 
case 8:sum=212; 
break; 
case 9:sum=243; 
break; 
case 10:sum=273; 
break; 
case 11:sum=304; 
break; 
case 12:sum=334; 
break; 

} 
sum=sum+ri; 
if((nian%400==0) ||(nian%4==0 && nian%100!=0 ))
leap=1; 
else 
leap=0; 
if(leap==1 && nian>3&&yue>2) 
sum++; 
cout <<sum<<endl;

return 0;
}
int main(int argc, char* argv[])
{
    int a,b,c,x;
	scanf("%d%d%d",&a,&b,&c);
	if(a%4==0&&a%100!=0||a%400==0)
	{
	if(b==1)printf("%d",c);
	else if(b==2)
	{x=31+c;printf("%d",x);}
	else if(b==3)
	{x=31+29+c;printf("%d",x);}
	else if(b==4)
	{x=31+29+31+c;printf("%d",x);}
	else if(b==5)
	{x=31+29+31+30+c;printf("%d",x);}
	else if(b==6)
	{x=31+29+31+30+31+c;printf("%d",x);}
	else if(b==7)
	{x=31+29+31+30+31+30+c;printf("%d",x);}
	else if(b==8)
	{x=31+29+31+30+31+30+31+c;printf("%d",x);}
	else if(b==9)
	{x=31+29+31+30+31+30+31+31+c;printf("%d",x);}
	else if(b==10)
	{x=31+29+31+30+31+30+31+31+30+c;printf("%d",x);}
	else if(b==11)
	{x=31+29+31+30+31+30+31+31+30+31+c;printf("%d",x);}
    else if(b==12)
	{x=31+29+31+30+31+30+31+31+30+31+30+c;printf("%d",x);}
	}
	else

	{
	if(b==1)printf("%d",c);
	else if(b==2)
	{x=31+c;printf("%d",x);}
	else if(b==3)
	{x=31+28+c;printf("%d",x);}
	else if(b==4)
	{x=31+28+31+c;printf("%d",x);}
	else if(b==5)
	{x=31+28+31+30+c;printf("%d",x);}
	else if(b==6)
	{x=31+28+31+30+31+c;printf("%d",x);}
	else if(b==7)
	{x=31+28+31+30+31+30+c;printf("%d",x);}
	else if(b==8)
	{x=31+28+31+30+31+30+31+c;printf("%d",x);}
	else if(b==9)
	{x=31+28+31+30+31+30+31+31+c;printf("%d",x);}
	else if(b==10)
	{x=31+28+31+30+31+30+31+31+30+c;printf("%d",x);}
	else if(b==11)
	{x=31+28+31+30+31+30+31+31+30+31+c;printf("%d",x);}
    else if(b==12)
	{x=31+28+31+30+31+30+31+31+30+31+30+c;printf("%d",x);}
	}
}
main()
{     int a,b,c;
      scanf("%d%d%d",&a,&b,&c);
      int f[12]={31,28,31,30,31,30,31,31,30,31,30,31};
      int i,k;  
      if(a%100==0&&a%400==0)
     {f[1]=29; 
      for(i=0,k=0;b!=i+1;i++)
      k=k+f[i];
      printf("%d",k+c);                      
                            } 
      else if(a%100!=0&&a%4==0)
      {f[1]=29; 
      for(i=0,k=0;b!=i+1;i++)
      k=k+f[i];
      printf("%d",k+c); 
           }
       else 
       {for(i=0,k=0;b!=i+1;i++)
      k=k+f[i];
      printf("%d",k+c); 
            }                   
       
}
int main()
{
	int year,month1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},month2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31},day,month,number=0,i;
	cin>>year>>month>>day;
	if(((year%4==0)&&(year%100!=0))||(year%400==0)) 
	{
		for(i=0;i<month;i++)
			number+=month2[i];
		number+=day;
	}
	else 
	{
		for(i=0;i<month;i++)
			number+=month1[i];
		number+=day;
	}
	cout<<number;

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

    if(a==0)
	{
		printf("%d",n);
	}
	if(m!=1&&m!=2&&a==1)
	{
		n=n+1;
		printf("%d",n);
	}
	if(a==1&&m==1)	printf("%d",n);
	if(a==1&&m==2) printf("%d",n);

	return 0;
}
void main()
{
	int a,b,c,d=0;
	scanf("%d %d %d",&a,&b,&c);
	if(b>=2) d=d+31; 
	if(b>=3) d=d+28;
	if(b>=4) d=d+31;
	if(b>=5) d=d+30;
	if(b>=6) d=d+31;
	if(b>=7) d=d+30;
	if(b>=8) d=d+31;
	if(b>=9) d=d+31;
	if(b>=10) d=d+30;
	if(b>=11) d=d+31;
	if(b>=12) d=d+31;
	d=d+c;
	if(((a%4==0&&a%100!=0)||(a%400==0))&&b>2)
		d=d+1;
	printf("%d",d);
}
int main()
{
	int a,b,c,i,e;
	int s[12];
	int d=0;
	scanf("%d %d %d",&a,&b,&c);
    if(a%4==0&&a%100!=0||a%400==0)
		s[1]=29;
	else
		s[1]=28;
	s[0]=31;s[2]=31;s[3]=30;s[4]=31;s[5]=30;s[6]=31;s[7]=31;s[8]=30;s[9]=31;s[10]=30;s[11]=31;
    for(i=1;i<=b;i++)
	{
		d=d+s[i-2];
	}
	e=d+c;
	printf("%d",e);
	return 0;
}
main()
{
    int year,month,day,leap,sum=0;
    int a[12],i,j;
    scanf("%d",&year);
    scanf("%d",&month);
    scanf("%d",&day);
    if((year%4==0&&year%100!=0)||(year%400==0))
        leap=1;
    else
        leap=0;
    a[0]=31;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;
    if(leap==1)
        a[1]=29;
    else a[1]=28;
    for(i=0;i<12;i++)
    {
        if(month==i+1)
        {
            for(j=0;j<i;j++)
                sum+=a[j];
            sum+=day;
            break;
        }
    }
    printf("%d",sum);
    getchar();
    getchar();
}
int main()
{  
    int Y, M, D, x, y=0, i, a[12], sum;
    scanf("%d %d %d", &Y, &M, &D);
    a[0]=31;a[2]=31;a[4]=31;a[6]=31;a[7]=31;a[9]=31;a[11]=31;
    a[3]=30;a[5]=30;a[8]=30;a[10]=30;
    if(Y%4!=0)
    a[1]=28;
    else if(Y%4==0&&Y%100!=0)
    a[1]=29;
    else if(Y%4==0&&Y%100==0&&Y%400==0)
    a[1]=29;
    else a[1]=28;
  for(i=1; i<=M; i++)
    {
     x = a[M-i];
    y = y + x;
}
 sum = y + D - a[M-1];
    printf("%d", sum);
    return 0;
}
int main()
{
    int n,y,r,s=0,i;
    scanf("%d %d %d",&n,&y,&r);
    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;
    if((n%4==0&&n%100!=0)||(n%400==0))
      a[1]=29;
     for(i=0;i<y-1;i++) 
      s = s+a[i];
     s=s+r;
     printf("%d\n",s);
     getchar();
     getchar();
}
int main()
{
	int t=0;
	int monthday[13]={0,31,28+t,31,30,31,30,31,31,30,31,30,31};

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

	if(year%4 == 0 && year%100 !=0 || year%400 == 0) t=1;

	int summonth=0;
	int sum=0;

	int i;
	for(i=0;i<month;i++) summonth+=monthday[i];
	sum=summonth+day;
	printf("%d",sum);


	
    return 0;

}
int main()
{
    int y,m,d,i,j,k,sum=0,a;
    scanf("%d %d %d",&y,&m,&d);
    for(i=1;i<=(m-1);i++)
    {
         if(i==1) 
         sum=sum+31;  
         if(i==3) 
         sum=sum+31;         
         if(i==5) 
         sum=sum+31; 
         if(i==7) 
         sum=sum+31; 
         if(i==8) 
         sum=sum+31; 
         if(i==10) 
         sum=sum+31; 
          if(i==12) 
         sum=sum+31; 
         if(i==4) 
         sum=sum+30; 
         if(i==6) 
         sum=sum+30; 
         if(i==9) 
         sum=sum+30; 
         if(i==11) 
         sum=sum+30; 
         if(i==2) 
         {
                  j=y%4,k=y%400,a=y%100;
                  if((a!=0&&j==0)||(k==0))
                  sum=sum+29;
                  else
                  sum=sum+28;
         }
    }
    sum=sum+d;
    printf("%d\n",sum);
    getchar();
    getchar();
}
int main()
{
	int a[5],b[5],c[5],sum[5],i;
	for(i=0;i<5;i++)
	scanf("%d %d %d",&a[i],&b[i],&c[i]);
	for(i=0;i<5;i++)
	{
	switch(b[i])
	{
	case 1: sum[i]=0;break;
    case 2: sum[i]=31;break;
    case 3: sum[i]=59;break;
    case 4: sum[i]=90;break;
    case 5: sum[i]=120;break;
    case 6: sum[i]=151;break;
    case 7: sum[i]=181;break;
    case 8: sum[i]=212;break;
    case 9: sum[i]=243;break;
    case 10: sum[i]=273;break; 
    case 11: sum[i]=304;break;
    case 12: sum[i]=334;break;
	}
	sum[i]=sum[i]+c[i];
	if(((a[i]%4==0&&a[i]%100!=0)||a[i]%400==0)&&b[i]>2) sum[i]=sum[i]+1;
	}
    for(i=0;i<5;i++)
	printf("%d\n",sum[i]);
	return 0;
}
struct
{
	int year;
	int month;
	int day;
}date;
main()
{
	int days;
	scanf("%d%d%d",&date.year,&date.month,&date.day);
	switch(date.month)
	{
	case 1:days=date.day;      break;
	case 2:days=date.day+31;   break;
	case 3:days=date.day+59;   break;
	case 4:days=date.day+90;   break;
	case 5:days=date.day+120;  break;
	case 6:days=date.day+151;  break;
	case 7:days=date.day+181;  break;
	case 8:days=date.day+212;  break;
	case 9:days=date.day+243;  break;
	case 10:days=date.day+273;  break;	
	case 11:days=date.day+304;  break;
	case 12:days=date.day+334;  break;
	}
	if ((date.year%4==0&&date.year%100!=0||date.year%400==0)&&date.month>=3)days+=1;
	printf("%d",days);
	return 0;
}
void main()
{
	int year,month,day,total;
	int i;
	scanf("%d%d%d",&year,&month,&day);
	total=0;
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
		{
			total=total+31;
		}
		if(i==4||i==6||i==9||i==11)
		{
			total=total+30;
		}
		if(i==2)
		{
			if(year%4==0&&year%100!=0||year%400==0)
			{
				total=total+29;
			}
			else
			{
				total=total+28;
			}
		}
	}
	total=total+day;
    printf("%d",total);
}