semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int day_of_month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

int main()
{
	int year,month,date;
	cin>>year>>month>>date;
	int total=0;
	if(year%400==0||(year%4==0&&year%100!=0))
	{
		day_of_month[2]=29;
		
		for(int i=0;i<month;i++)
		{
			total+=day_of_month[i];
		}
		total+=date;
	}
	else
	{
		day_of_month[2]=28;
		for(int i=0;i<month;i++)
		{
			total+=day_of_month[i];
		}
		total+=date;
	}
	cout<<total<<endl;
	
	return 0;
}
int main(int argc, char* argv[])
{int a,b,c,e,i;
int d=0;

scanf("%d %d %d",&a,&b,&c);
if (a%4==0&&a%100!=0||a%400==0){int score[12]={31,29,31,30,31,30,31,31,30,31,30,31};
for (i=0;i<b-1;i++){
	d=d+score[i];}
e=d+c;}
	else{int score[12]={31,28,31,30,31,30,31,31,30,31,30,31};
for (i=0;i<b-1;i++){
	d=d+score[i];}
e=d+c;}
	printf("%d\n",e);
	return 0;
}
main()
{int run(int n);
 int q[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
 int i,n,y,r,s=0,k;
 scanf("%d %d %d",&n,&y,&r);
 for(i=0;i<y;i++)
  s=s+q[i];
 s=s+r;
 k=run(n);
 if(k&&(y>2)) s+=1;
 printf("%d",s);
 
}

int run(int n)
{int a;
 if((n%400==0)||((n%4==0)&&(n%100!=0)))  a=1;
 else a=0; 
 return a;
}
main()
{
	int year;
	int month;
	int day;
	int result=0;
	int i;
	int yue[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	
	scanf("%d %d %d",&year,&month,&day);
	
	if((year%100==0&&year%400==0)||year%100!=0&&year%4==0)
		yue[1]=29;

	if(month==1)
	{
		result=result+day;
		printf("%d",result);

	}
	if(month>1)
	{
		for(i=0;i<month-1;i++)
		{
			result=result+yue[i];
		}
		result=result+day;
		printf("%d\n",result);
	
	}



	


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

	else 
	{
		if(n==1)
		{y=z;
		printf("%d",y);}
	else	if(n==2) 
	{	y=31+z;
	printf("%d",y);}
	else	if(n==3)
	{y=31+28+z;
	printf("%d",y);}
		else if(n==4)
		{	y=31*2+28+z;
		printf("%d",y);}
	else	if(n==5)
	{	y=31*2+28+30+z;
	printf("%d",y);}
	else	if(n==6)
	{	y=31*3+28+30+z;
	printf("%d",y);}
	else	if(n==7)
	{	y=31*3+28+30*2+z;
	printf("%d",y);}
        else if(n==8)
		{	y=31*4+28+30*2+z;
		printf("%d",y);}
        else if(n==9)
		{y=31*5+28+30*2+z;
		printf("%d",y);}
		else if(n==10)
		{y=31*5+28+30*3+z;
		printf("%d",y);}
		else if(n==11)
		{y=31*6+28+30*3+z;
		printf("%d",y);}
		else if(n==12)
		{y=31*6+28+30*4+z;
		printf("%d",y);}
	}
	return 0;
}
int main()
{
	int N,A,B,a;
	scanf("%d%d%d",&N,&A,&B);
	if(N%100!=0&&N%4==0||N%400==0)
	{
		 for(a=0,A=A-1;A!=0;A--)
		 {
			switch(A)
				{
				case 1:
				case 3:
      			case 5:
    			case 7:
				case 8:
				case 10:
				case 12:a+=31;
					break;
				case 2:a+=29;
					break;
				case 4:
				case 6:
      			case 9:
    			case 11:a+=30;
					break;
				}
		 }
	}
	else
	{
		 for(a=0,A=A-1;A!=0;A--)
		 {
			 switch(A)
				{
				case 1:
				case 3:
      			case 5:
    			case 7:
				case 8:
				case 10:
				case 12:a+=31;
					break;
				case 2:a+=28;
					break;
				case 4:
				case 6:
      			case 9:
    			case 11:a+=30;
					break;
				}
		 }
	 a+=B;
	}
	printf("%d",a);
}
int main()
{
	int y,m,d,t=0;
	int leap(int y);
	scanf("%d%d%d",&y,&m,&d);
	switch(m)
	{
	case 12:t+=30;
	case 11:t+=31;
	case 10:t+=30;
	case 9:t+=31;
	case 8:t+=31;
	case 7:t+=30;
	case 6:t+=31;
	case 5:t+=30;
	case 4:t+=31;
	case 3:t+=28;
	case 2:t+=31;
	case 1:t+=0;
	}
	if(m>2&&leap(y))
	{
		t+=1;
	}
	t+=d;
	printf("%d",t);
	return 0;
}
int leap(int y)
{
	if((y%4==0&&y%100!=0)||(y%400==0))
	{
		return 1;
	}
	else
	{
		return 0;
	}
}
int main()
{
	int m,a,b;
	int i,s;
	int c=0;
	scanf("%d %d %d",&m,&a,&b);
	if((m%4==0&&m%100!=0)||(m%400==0))
	{
		int months[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
		for(i=0;i<a;i++)
			c=c+months[i];
		s=c+b;
	}
	else
	{ 
		int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
		for(i=0;i<a;i++)
			c=c+month[i];
		s=c+b;
	}
	printf("%d",s);
	return 0;
}
int main(int argc, char* argv[])
{
	int a, b, c, d;
	scanf("%d%d%d", &a, &b, &c);
	if(b==1)
	{
	
		d=c;
	}
	
	
	
	else if(b==2)
	{
		d=31+c;
		
	}
	else 
	{
		if((a%4==0&&a%100!=0)||(a%400==0))
		{
	
		if(b==3)
		{
			d=31+29+c;
			
		}
		if(b==4)
		{
			d=31+29+31+c;
		    
		}
		if(b==5)
		{
			d=31+29+31+30+c;
			
		}
		if(b==6)
		{
			d=31+29+31+30+31+c;
		
		}
		if(b==7)
		{
			d=31+29+31+30+31+30+c;
            
		}
	    if(b==8)
		{
            d=31+29+31+30+31+30+31+c;
            
		}
		if(b==9)
		{
            d=31+29+31+30+31+30+31+31+c;
           
		}

        if(b==10)
		{
            d=31+29+31+30+31+30+31+31+30+c;
            
		}

        if(b==11)
		{
            d=31+29+31+30+31+30+31+31+30+31+c;
            
		}
        if(b==12)
		{
            d=31+29+31+30+31+30+31+31+30+31+30+c;
            
		}
		}
	    else 
		{
		if(b==3)
		{
			d=31+28+c;
			
		}
		if(b==4)
		{
			d=31+28+31+c;
		    
		}
		if(b==5)
		{
			d=31+28+31+30+c;
			
		}
		if(b==6)
		{
			d=31+28+31+30+31+c;
			
		}
		if(b==7)
		{
			d=31+28+31+30+31+30+c;
            
		}
	    if(b==8)
		{
            d=31+28+31+30+31+30+31+c;
            
		}
		if(b==9)
		{
            d=31+28+31+30+31+30+31+31+c;
            
		}

        if(b==10)
		{
            d=31+28+31+30+31+30+31+31+30+c;
            
		}

        if(b==11)
		{
            d=31+28+31+30+31+30+31+31+30+31+c;
            
		}
        if(b==12)
		{
            d=31+28+31+30+31+30+31+31+30+31+30+c;
            
		}
		}
	}
     printf("%d", d);
	
	return 0;
}
int main()
{
	int year,mon,day,a;
	scanf("%d%d%d",&year,&mon,&day);
	    if(mon==1)
			a=day;
		else if(mon==2)
			a=31+day;
		else if(mon==3)
			a=59+day;
		else if(mon==4)
			a=90+day;
		else if(mon==5)
			a=120+day;
		else if(mon==6)
			a=151+day;
        else if(mon==7)
			a=181+day;
        else if(mon==8)
			a=212+day;
        else if(mon==9)
			a=243+day;
		else if(mon==10)
			a=273+day;
		else if(mon==11)
			a=304+day;
		else 
			a=334+day;
		if((year % 4 == 0 && year % 100 !=0 ) || year % 400 == 0)
		{
			if(mon>=3)
				a=a+1;
		}
		printf("%d\n",a);
		return 0;
}
int main()
{
	int a, b, c, d[12], sum=0;
	int 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)
		{
		    d[i]=31;
		}
	    else if(i==4 || i==6 || i==9 || i==11)
		{
	    	d[i]=30;
		}
	    else
		{
		    if(a%4==0 && a%100 != 0 || a%400==0)
			{
			d[2]=29;
			}
			else 
			{
				d[2]=28;
			}
		}
		sum+=d[i];
	}
	printf("%d\n", sum+c);
	return 0;
}
int main()
{
int year,month,day,d=0;


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


switch(month)
{case 1:d=0;break;
case 2:d=31;break;

case 3:d=59;break;

case 4:d=90;break;

case 5:d=120;break;

case 6:d=151;break;

case 7:d=181;break;

case 8:d=212;break;

case 9:d=243;break;

case 10:d =273;break;

case 11:d=304;break;

case 12:d=334;break;

}if ((month>2)&&(year%400==0)){d=d+1+day;}
else if ((month>2)&&(year%100!=0)&&(year%4==0)){ d=d+1+day;}

else {d=d+day;}
 
printf("%d\n",d);

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

		}
	}
	else
	{
        switch(m)
		{
		case 1:n=d;break;
		case 2:n=31+d;break;
		case 3:n=d+31+28;break;
		case 4:n=d+31*2+28;break;
		case 5:n=d+28+31*2+30;break;
		case 6:n=d+28+31*3+30;break;
		case 7:n=d+28+31*3+30*2;break;
		case 8:n=d+28+31*4+30*2;break;
		case 9:n=d+28+31*5+30*2;break;
		case 10:n=d+28+31*5+30*3;break;
		case 11:n=d+28+31*6+30*3;break;
		case 12:n=d+28+31*6+30*4;break;

		}

	}
	printf("%d",n);
	return 0;
}
int main()
{
	int leap(int year);
	int cal(int month,int day);
	int call(int month,int day);
	int k,year,month,day,num;
	scanf("%d%d%d",&year,&month,&day);
	k=leap(year);
	if(k==0)
	{
		num=cal(month,day);
	}
	if(k==1)
	{
		num=call(month,day);
	}
	printf("%d\n",num);
	return 0;
}

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

	return 0;    
}
int main()
{
	int a,b,c,y;
	scanf("%d%d%d",&a,&b,&c);
    if ((a%4==0)&&(a%100!=0))
		{
        if(b==1)
		{
			y=c;
		}
		if(b==2)
		{
			y=31+c;
		}
		if(b==3)
		{
			y=31+29+c;
		}
		if(b==4)
		{
			y=31+29+31+c;
		}
		if(b==5)
		{
			y=31+29+31+30+c;
		}
	    if(b==6)
		{
			y=31+29+31+30+31+c;
		}
		if(b==7)
		{
			y=31+29+31+30+31+30+c;
		}
	 
		if(b==8)
		{
			y=31+29+31+30+31+30+31+c;
		}	
		if(b==9)
		{
			y=31+29+31+30+31+30+31+31+c;
		}
		if(b==10)
		{
			y=31+29+31+30+31+30+31+31+30+c;
		}

        if(b==11)
		{
			y=31+29+31+30+31+30+31+31+30+31+c;
		}

        if(b==12)
		{
			y=31+29+31+30+31+30+31+31+30+31+30+c;
		}
		printf("%d",y);
	}

    else if (a%400==0)
		{
        if(b==1)
		{
			y=c;
		}
		if(b==2)
		{
			y=31+c;
		}
		if(b==3)
		{
			y=31+29+c;
		}
		if(b==4)
		{
			y=31+29+31+c;
		}
		if(b==5)
		{
			y=31+29+31+30+c;
		}
	    if(b==6)
		{
			y=31+29+31+30+31+c;
		}
		if(b==7)
		{
			y=31+29+31+30+31+30+c;
		}
	 
		if(b==8)
		{
			y=31+29+31+30+31+30+31+c;
		}	
		if(b==9)
		{
			y=31+29+31+30+31+30+31+31+c;
		}
		if(b==10)
		{
			y=31+29+31+30+31+30+31+31+30+c;
		}

        if(b==11)
		{
			y=31+29+31+30+31+30+31+31+30+31+c;
		}

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

        if(b==11)
		{
			y=31+28+31+30+31+30+31+31+30+31+c;
		}

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

       else if(b==8)
	   x=213+c;

	   else if(b==9)
	   x=244+c;

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