semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{   
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;
		printf("%d",d);
	}
		else if (b==2 )
	{
		d=31+c;
		printf("%d",d);
	}
			else if (b==3 )
	{
		d=31+29+c;
		printf("%d",d);
	}
				else if (b==4 )
	{
		d=31+29+31+c;
		printf("%d",d);
	}
					else if (b==5 )
	{
		d=31+29+31+30+c;
		printf("%d",d);
	}
						else if (b==6 )
	{
		d=31+29+31+30+31+c;
		printf("%d",d);
	}
							else if (b==7 )
	{
		d=31+29+31+30+31+c+30;
		printf("%d",d);
	}
								else if (b==8)
	{
		d=31+29+31+30+31+c+30+31;
		printf("%d",d);
	}
									else if (b==9 )
	{
		d=31+29+31+30+31+c+30+31+31;
		printf("%d",d);
	}
										else if (b==10 )
	{
		d=31+29+31+30+31+c+30+31+31+30;
		printf("%d",d);
	}
											else if (b== 11)
	{
		d=31+29+31+30+31+c+30+31+31+30+31;
		printf("%d",d);
	}
												else if (b==12 )
	{
		d=31+29+31+30+31+c+30+31+31+30+31+30;
		printf("%d",d);
	}
												

}
else if(a%4!=0||(a%100==0&&a%400!=0 ))
{
	if (b==1 )
	{
		d=c;
		printf("%d",d);
	}
		else if (b==2 )
	{
		d=31+c;
		printf("%d",d);
	}
			else if (b==3 )
	{
		d=31+28+c;
		printf("%d",d);
	}
				else if (b==4 )
	{
		d=31+28+31+c;
		printf("%d",d);
	}
					else if (b==5 )
	{
		d=31+28+31+30+c;
		printf("%d",d);
	}
						else if (b==6 )
	{
		d=31+28+31+30+31+c;
		printf("%d",d);
	}
							else if (b==7 )
	{
		d=31+28+31+30+31+c+30;
		printf("%d",d);
	}
								else if (b==8)
	{
		d=31+28+31+30+31+c+30+31;
		printf("%d",d);
	}
									else if (b==9 )
	{
		d=31+28+31+30+31+c+30+31+31;
		printf("%d",d);
	}
										else if (b==10 )
	{
		d=31+28+31+30+31+c+30+31+31+30;
		printf("%d",d);
	}
											else if (b== 11)
	{
		d=31+28+31+30+31+c+30+31+31+30+31;
		printf("%d",d);
	}
												else if (b==12 )
	{
		d=31+28+31+30+31+c+30+31+31+30+31+30;
		printf("%d",d);
	}
}


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

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

	}
	else
		switch (m)
	{
            case 1: printf("%d\n",d);break;
			case 2: printf("%d\n",d+31);break;
			case 3: printf("%d\n",d+59);break;
			case 4: printf("%d\n",d+90);break;
			case 5: printf("%d\n",d+120);break;
			case 6: printf("%d\n",d+151);break;
			case 7: printf("%d\n",d+181);break;
			case 8: printf("%d\n",d+212);break;
			case 9: printf("%d\n",d+243);break;
			case 10: printf("%d\n",d+273);break;
			case 11: printf("%d\n",d+304);break;
			case 12:printf("%d\n",d+334);break;
	}
	return 0;
}
int main()
{
	int A,B,C,d,z,leap,i;
	i=1;
while(i<=5)
	{
scanf("%d %d %d\n",&A,&B,&C);
	if(A%4==0)
	{
		if(A%100==0)
		{
			if(A%400==0)
				leap=1;
			else
				leap=0;
		}
		else
			leap=1;
	}
	else
	leap=0;
	if(leap)
	{
		switch(B)
		{
		case 1:d=0;break;
			case 2:d=31;break;
			case 3:d=60;break;
            case 4:d=91;break;
            case 5:d=121;break;
			case 6:d=152;break;
			case 7:d=182;break;
			case 8:d=213;break;
			case 9:d=244;break;
			case 10:d=274;break;
			case 11:d=305;break;
			case 12:d=335;break;
		}
		z=d+C;}
	else
	{
	switch(B)
		{
		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;
		}
		z=d+C;}
	printf("%d\n",z);
	i=i+1;
	}
	return 0;
}
void main()
{
	int a,b,c,n;
	scanf("%d%d%d",&a,&b,&c);
	int one[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int another[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int i;
	int m=0;
	if(a%4==0&&a%100!=0||a%400==0){
	      for(i=0;i<(b-1);i++){
			  m=m+one[i];
		  }
		  n=m+c;
    }
	else{
		for(i=0;i<(b-1);i++){
			m=m+another[i];
		}
		n=m+c;
	}
	printf("%d\n",n);
}
main()
{
      int year,month,day,D=0,i;
      scanf("%d %d %d",&year,&month,&day);
      if(year%400==0||(year%100!=0&&year%4==0))
      {
               int a[12]={31,29,31,30,31,30,31,31,30,31,30,31};
               for(i=0;i<month-1;i++)
               D=D+a[i];
               D=D+day;
      }
      else
      {
               int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
               for(i=0;i<month-1;i++)
               D=D+a[i];
               D=D+day;
      }
      printf("%d",D);
      getchar();
      getchar();
      return 0;
}
void main()
{
 int year,month,day,x=0;
 scanf ("%d %d %d",&year,&month,&day);
 if (month==2)
  {
   x=31+day;
   printf ("%d",x);
  }
 else if (month==1)   {x=day;printf ("%d",x);}
 else
    {
     if  ( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) )
          {
         switch(month)
               {
                case 3:x=31+29;break;
                case 4:x=31+29+31;break;

                case 5:x=31+29+31+30;break;

                case 6:x=31+29+31+30+31;break;

                case 7:x=31+29+31+30+31+30;break;

                case 8:x=31+29+31+30+31+30+31;break;

                case 9:x=31+29+31+30+31+30+31+31;break;


                case 10:x=31+29+31+30+31+30+31+31+30;break;


                case 11:x=31+29+31+30+31+30+31+31+30+31;break;
                case 12:x=31+29+31+30+31+30+31+31+30+31+30;break;
              }
            }
           else 
                {
                  switch(month)
               {
                case 3:x=31+28;break;
                case 4:x=31+28+31;break;

                case 5:x=31+28+31+30;break;

                case 6:x=31+28+31+30+31;break;

                case 7:x=31+28+31+30+31+30;break;

                case 8:x=31+28+31+30+31+30+31;break;

                case 9:x=31+28+31+30+31+30+31+31;break;


                case 10:x=31+28+31+30+31+30+31+31+30;break;


                case 11:x=31+28+31+30+31+30+31+31+30+31;break;
                case 12:x=31+28+31+30+31+30+31+31+30+31+30;break;
              }
              }
             x=x+day;
              
              printf ("%d",x);
}
}
int main()
{
	int year,month,day,i,n;
	scanf("%d%d%d",&year,&month,&day);
	for (i=1,n=0;i<month;i++)
	{
		if (i==1||i==3||i==5||i==7||i==8||i==10)
		{
			n=n+31;
		}
		else if (i==2)
		{
			if ((year%4==0&&year%100!=0)||(year%400==0))
			{
				n=n+29;
			}
			else
			{
				n=n+28;
			}
		}
		else 
		{
			n=n+30;
		}
	}
	n=n+day;
	printf("%d\n",n);


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

}
int main()
{
    scanf("%d%d%d",&y,&m,&d);
    if(y%100==0)
    {
        if(y%400==0) cal(1);
        else  cal(0);
    }
        else
        {
            if(y%4==0) cal(1);
            else cal(0);
        }
    return 0;
    
}
int main()
{
	int year,month,day,i,n=0;
	int monthday[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d",&year,&month,&day);
    for(i=1;i<month;i++)
	{n=n+monthday[i-1];
	}
	n=n+day;
    
	if(month>2&&(year%4==0&&year%100!=0||year%400==0))
		n=n+1;




	printf("%d\n",n);
	return 0;
}
int	check(int year)
{
	if((year % 400 == 0) || ((year % 100 != 0) && (year % 4 == 0)))
	{return 1;}
	else
	{return 0;}
}
int main()
{
	int	year, month, day, date = 0;
	cin >> year;
	cin >> month;
	cin >> day;
	int	m[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	
	int	i;
	for (i = 1; i < month; i ++)
	{
		date = date + m[i];
		if(i == 2)
		{
			date = date + check(year);
		}
	}
	date = date + day;

	cout << date << endl;
return 0;
}
int main()
{
	int y,m,d,sum,i;
    scanf("%d %d %d",&y,&m,&d);
	sum=0;
    for (i=1;i<m;i++)
		if ((i==1) || (i==3) || (i==5) || (i==7) || (i==8) || (i==10))
			sum=sum+31;
		else if (i==2)
			if (((y%4==0) && (y%100!=0)) || (y%400==0))
				sum=sum+29;
			else sum=sum+28;
		else sum=sum+30;
    sum=sum+d;
	printf("%d\n",sum);
	return 0;
}
int main()
{
	int year,month,day,flag;
	int daytal,tal;
	cin>>year>>month>>day;
	if(year%400==0||(year%4==0)&&(year%100!=0))
		flag=0;
	else
		flag=1;
	switch(month)
	{
	case 1:
		daytal=0;
		break;
	case 2:
		daytal=31;
		break;
	case 3:
		daytal=60;
		break;
	case 4:
		daytal=91;
		break;
	case 5:
		daytal=121;
		break;
	case 6:
		daytal=152;
		break;
	case 7:
		daytal=182;
		break;
	case 8:
		daytal=213;
		break;
	case 9:
		daytal=244;
		break;
	case 10:
		daytal=274;
		break;
	case 11:
		daytal=305;
		break;
	case 12:
		daytal=335;
		break;
	}
	if(month<2)
		flag=0;
	tal=daytal+day-flag;
	cout<<tal<<endl;
	return 0;
}
int main(int argc, char* argv[])
{
	int year,month,day;
	scanf("%d%d%d",&year,&month,&day);
	int n=0;
	static int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int i;
	for(i=0;i<month;i++)
	{
		n=days[i]+n;
	}
	n=day+n;
	if((year%100==0&&year%400==0)||(year%100!=0&&year%4==0))
		n++;
	printf("%d\n",n);
	return 0;
}
void main()
{
	int year,month,day,num=0;
	scanf("%d%d%d",&year,&month,&day);
	if(year%4!=0 || (year%100==0 && year/400!=0) )
	{
		switch(month-1)
		{
			case 11:num+=30;
			case 10:num+=31;
			case 9:num+=30;
			case 8:num+=31;
			case 7:num+=31;
			case 6:num+=30;
			case 5:num+=31;
			case 4:num+=30;
			case 3:num+=31;
			case 2:num+=28;
			case 1:num+=31;
			case 0:;break;
		}
		num+=day;
	}
	else
	{
		switch(month-1)
		{
			case 11:num+=30;
			case 10:num+=31;
			case 9:num+=30;
			case 8:num+=31;
			case 7:num+=31;
			case 6:num+=30;
			case 5:num+=31;
			case 4:num+=30;
			case 3:num+=31;
			case 2:num+=29;
			case 1:num+=31;
			case 0:;break;
		}
		num+=day;
	}
	printf("%d\n",num);
}
int main()
{
    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 i,year,month,day,sum=0,months[50],msum=0;

	months[1]=31;
	months[2];
	months[3]=31;
	months[4]=30;
	months[5]=31;
	months[6]=30;
	months[7]=31;
	months[8]=31;
	months[9]=30;
	months[10]=31;
	months[11]=30;
	months[12]=31;

	scanf("%d%d%d",&year,&month,&day);
	if(year%4==0)
	{
		if(year%100!=0)
		{
			if(year%400==0)
			{
				months[2]=29;
			}
			else
			{
				months[2]=28;
			}
		}
		else
		{
			if(year%400==0)
			{
				months[2]=29;
			}
			else
			{
				months[2]=28;
			}
		}
	}
	else
	{
		months[2]=28;
	}
	for(i=1;i<month;i++)
	{
		msum=msum+months[i];
	}
	sum=msum+day;
	printf("%d",sum);
	return 0;
}
int main()
{
 int a,b,c,d;
 int f[12]={31,28,31,30,31,30,31,31,30,31,30,31};
scanf("%d%d%d",&a,&b,&c);
int sum=0,i;
	for(i=0;i<b-1;i++)
	{
		sum=sum+f[i];
	}
if (((a%4==0)&&(a%100!=0))||(a%400==0))
{
	
if(b<3)
{
	d=sum+c;
}
else
{
    d=sum+1+c;
}
}
else
{
	d=sum+c;
}
printf("%d",d);
 return 0;
}
int main()  
{  
	int y,m,d,day[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	cin>>y>>m>>d;
	if((y%4==0&&y%100!=0)||(y%400==0))
		day[1]=29;
	for(int i=0;i<m-1;i++)
		d+=day[i];
	cout<<d;
    return 0;  
}
int main(){
    int y,m,d,d1=0,d2,i;
	int md[11]={31,28,31,30,31,30,31,31,30,31,30};
	scanf("%d %d %d" ,&y,&m,&d);
	if(m==1) d2=d;
	else{

		for(i=0;i<m-1;i++) 
		     d1=d1+md[i];
	    d2=d+d1;
		
	}
	printf("%d",d2);

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

	scanf("%d %d %d",&year,&month,&date);
	if (year%4==0&&year%100!=0||year%400==0)
	{
		mon[2]=29;
	}
	else
	{
		mon[2]=28;
	}

	int i;
	for (i=1;i<month;i++)
	{
		sum+=mon[i];
	}
	sum+=date;
	printf("%d",sum);


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

		}
	}
	if(count==0)
	{
		switch(mounth)
		{
		case 1: t=day; break;
		case 2: t=31+day; break;
		case 3: t=59+day;break;
		case 4: t=90+day;break;
		case 5: t=120+day;break;
		case 6: t=151+day;break;
		case 7: t=181+day;break;
		case 8: t=212+day;break;
		case 9: t=243+day;break;
		case 10: t=273+day;break;
		case 11: t=304+day;break;
		case 12: t=334+day;break;
		}
	}
	printf("%d",t);

}