semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
int n,y,r,d,i;
for (i=1;i<=5;i++)
{
scanf("%d%d%d\n",&n,&y,&r);
d=0;
if ((y>2)&&(n%400==0)) d=1;
if ((y>2)&&(n%100!=0)&&(n%4==0)) d=1;
d=d+r;
y--;
switch(y)
{
case 11:d=d+30;
case 10:d=d+31;
case 9:d=d+30;
case 8:d=d+31;
case 7:d=d+31;
case 6:d=d+30;
case 5:d=d+31;
case 4:d=d+30;
case 3:d=d+31;
case 2:d=d+28;
case 1:d=d+31;
}
printf("%d\n",d);
}
return 0;
}
int main()
{
int a,b,c,x,i;
scanf("%d %d %d",&a,&b,&c);
if(a%4==0&&a%100!=0)
{
  int n[12]={31,29,31,30,31,30,31,31,30,31,30,31};
  for(i=0,x=0;i<b-1;i++)
  {    
	x=x+n[i];
  }
}
if(a%400==0)
{
  int n[12]={31,29,31,30,31,30,31,31,30,31,30,31};
  for(i=0,x=0;i<b-1;i++)
  {    
	x=x+n[i];
  }
}
else
{
  int n[12]={31,28,31,30,31,30,31,31,30,31,30,31};
  for(i=0,x=0;i<b-1;i++)
  {    
	x=x+n[i];
  } 
}
x=x+c;
printf("%d",x);
return 0;
}
int main()
{
    int y,m,d;
    cin>>y>>m>>d;
    int a[13];
    a[1]=31;
    if((y%4==0 && y%100!=0) || (y%400==0))
    a[2]=29;
    else
    a[2]=28;
    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;
    int n,i;
    n=0;
    for(i=1;i<m;i++)
    n=n+a[i];
    n=n+d;
    cout<<n<<endl;
    return 0;
}
int main()
{
    int year[6],month[6],day[6],s[6]={0};
	int i=1,n;
    int m[13]={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    n=1;
	while (n<=5)
	{
    scanf("%d %d %d",&year[n],&month[n],&day[n]);
    if ((year[n]%4==0 && year[n] % 100 !=0 ) || year[n] % 400 == 0)  
    m[2]=29;else m[2]=28;
    while (i<month[n]) 
	{
    s[n]=s[n]+m[i];
    i=i+1;
	}
    s[n]=s[n]+day[n];
	n=n+1;
	i=1;
	}
    for(n=1;n<=5;n=n+1)  printf("%d\n",s[n]);
    return 0;
}
main()
{
	int y,m,day,tot=0,i;
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};

	scanf("%d %d %d",&y,&m,&day);
	if ((y%400==0)||((y%4==0)&&(y%100!=0))) a[1]++;
    for (i=0;i<m-1;i++)
    tot+=a[i];
	tot+=day;
	printf("%d\n",tot);
	return 0;
}
int 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);
return 0;
}
int main(int argc, char* argv[])
{
	int k,m,d,i,n;
	scanf("%d%d%d", &k,&m,&d);
	if (k%4==0)
		if (k%100==0)
			if (k%400==0)
				i=29;
			else
				i=28;
		else
			i=29;
	else
		i=28;
	if (m==1)
		printf("%d\n",d);
	if (m==2)
	{
		n=d+31;
		printf("%d\n",n);
	}
		if (m==3)
		{
			n=d+i+31;
			printf("%d\n",n);
		}
		if (m==4)
		{
			n=d+i+31+31;
printf("%d\n",n);
		}
if (m==5)
		{
			n=d+i+31+30+31;
			printf("%d\n",n);
		}
		if (m==6)
		{
			n=d+i+31+31+30+31;
printf("%d\n",n);
		}
if (m==7)
		{
			n=d+i+31+31+31+60;
			printf("%d\n",n);
		}
		if (m==8)
		{
			n=d+i+184;
printf("%d\n",n);
		}
if (m==9)
		{
			n=d+i+184+31;
			printf("%d\n",n);
		}
		if (m==10)
		{
			n=d+i+31+30+184;
printf("%d\n",n);
		}	
		if (m==11)
		{
			n=d+i+31+61+184;
			printf("%d\n",n);
		}
		if (m==12)
		{
			n=d+i+31+30+61+184;
printf("%d\n",n);
		}
		return 0;
}
int main()
{
	int y,m,d,r;
	int c(int y,int m,int d);
	scanf("%d %d %d",&y,&m,&d);
	r=c(y,m,d);
	printf("%d",r);
}

int run(int y)
{
	if (y%400==0) return 1;
	else if (y%100==0) return 0;
		else if (y%4==0) return 1;
	return 0;
}

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


	return 0;
}
int main()
{
int a[12]={0,31,59,90,120,151,181,212,243,273,304,334,365};
int d;
int y;
int i;
int m;
int s=0;
scanf("%d%d%d",&y,&m,&d);

if(((y%4==0)&&(y%100!=0))||(y%400==0))
{ 
    if(m==1||m==2)
     s=a[m-1]+d;
    else s=a[m-1]+d+1;
}
else
s=a[m-1]+d;

		
	


	
	printf("%d",s);
	return 0;
}
int main()
{
	int year,month,day,sum=0,i;
	cin>>year>>month>>day;
	if(( (year%400)==0) || ( ((year%4)==0) && ((year%100)!=0) ) )
	{
		int days[12]={31,29,31,30,31,30,31,31,30,31,30,31};
		for(i=0;i<month-1;i++)
			sum=sum+days[i];
	}
	else 
	{
		int days[12]={31,28,31,30,31,30,31,31,30,31,30,31};
		for(i=0;i<month-1;i++)
			sum=sum+days[i];
	}
	sum=sum+day;
	cout<<sum<<endl;
	return 0;
}
int main()
{
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
    int n, m,d;
   cin >> n >> m >> d;
int counter = 0;
    for(int  i = 0 ; i < m-1; i++){
        if(i == 1&&(n%4==0&&(n%100!=0)||n%400==0)){
                counter++;
}
        counter = counter + month[i];
}

counter = counter + d;
cout << counter;
}
int isrn(int n)
{
	if(n%400==0)
		return 1;
	else
	{
		if(n%100==0)
			return 0;
		else
		{
			if(n%4==0)
				return 1;
			else 
				return 0;
		}
	}
}

void main()
{
	int y,m,d,sum=0,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)
		{
			sum+=31;
		}
		if(i==4||i==6||i==9||i==11)
		{
			sum+=30;
		}
		if(i==2)
		{
			if(isrn(y))
				sum+=29;
			else 
				sum+=28;
		}
	}
	sum+=d;
	printf("%d\n",sum);
}
int main()
{
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int month_l[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
    int n, m,d;
   cin >> n >> m >> d;
int counter = 0;
    for(int  i = 0 ; i < m-1; i++){
        if(i == 1){
            if(n%4==0&&(n%100!=0)||n%400==0){
                counter++;
}
}
        counter = counter + month[i];
}

counter = counter + d;
cout << counter;
}
int main()
{
	int year,month,day,a,all,m1[5],m2[5],m3[5],i;
	for(i=0;i<=4;i++)
	scanf("%d%d%d",&m1[i],&m2[i],&m3[i]);
	for(i=0;i<=4;i++)
	{
		year=m1[i];month=m2[i];day=m3[i];
	if((year%4==0&&year%100!=0)||(year%400==0))
	{
		switch(month)
		{
		case 1:a=366;break;
		case 2:a=335;break;
		case 3:a=306;break;
		case 4:a=275;break;
		case 5:a=245;break;
		case 6:a=214;break;
		case 7:a=184;break;
		case 8:a=153;break;
		case 9:a=122;break;
		case 10:a=92;break;
		case 11:a=61;break;
		case 12:a=31;break;
		}
		all=366-a+day;
		
	}
	else
	{
		switch(month)
		{
		case 1:a=365;break;
		case 2:a=334;break;
		case 3:a=306;break;
		case 4:a=275;break;
		case 5:a=245;break;
		case 6:a=214;break;
		case 7:a=184;break;
		case 8:a=153;break;
		case 9:a=122;break;
		case 10:a=92;break;
		case 11:a=61;break;
		case 12:a=31;break;
		}
		all=365-a+day;
		
	}
	printf("%d\n",all);
	}
	return 0;
}
int main()
{
	int year,month,day,leap,y;
	scanf("%d%d%d",&year,&month,&day);
	
	if(year%4==0)
	{
		if(year%100==0)
		{
			if(year%400==0)
				leap=1;
			else
				leap=0;
		}
		else
			leap=1;
	}
	else
		leap=0;

	if(leap==1)
	{
		switch(month)
		{
		case 1:printf("%d",day);break;
		case 2:printf("%d",31+day);break;
		case 3:printf("%d",29+31+day);break;
		case 4:printf("%d",31+29+31+day);break;
		case 5:printf("%d",30+31+29+31+day);break;
		case 6:printf("%d",31+30+31+29+31+day);break;
		case 7:printf("%d",30+31+30+31+29+31+day);break;
		case 8:printf("%d",31+30+31+30+31+29+31+day);break;
		case 9:printf("%d",31+31+30+31+30+31+29+31+day);break;
		case 10:printf("%d",30+31+31+30+31+30+31+29+31+day);break;
		case 11:printf("%d",31+30+31+31+30+31+30+31+29+31+day);break;
		case 12:printf("%d",30+31+30+31+31+30+31+30+31+29+31+day);break;
		}
	}
	else
	{
		switch(month)
		{
		case 1:printf("%d",day);break;
		case 2:printf("%d",31+day);break;
		case 3:printf("%d",28+31+day);break;
		case 4:printf("%d",31+28+31+day);break;
		case 5:printf("%d",30+31+28+31+day);break;
		case 6:printf("%d",31+30+31+28+31+day);break;
		case 7:printf("%d",30+31+30+31+28+31+day);break;
		case 8:printf("%d",31+30+31+30+31+28+31+day);break;
		case 9:printf("%d",31+31+30+31+30+31+28+31+day);break;
		case 10:printf("%d",30+31+31+30+31+30+31+28+31+day);break;
		case 11:printf("%d",31+30+31+31+30+31+30+31+28+31+day);break;
		case 12:printf("%d",30+31+30+31+31+30+31+30+31+28+31+day);break;
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int a,b,c,d,n;
	scanf("%d%d%d",&a,&b,&c);	
    if((a%4==0&&a%100!=0)||(a%400==0))
	    d=29;
	else
		d=28;
	if (b==1)
		n=c;
	else if (b==2)
		n=c+31;
	else if(b==3)
		n=31+d+c;
	else if(b==4)
		n=62+d+c;
	else if(b==5)
		n=92+d+c;
	else if(b==6)
		n=123+d+c;
	else if(b==7)
		n=153+d+c;
	else if(b==8)
		n=184+d+c;
	else if(b==9)
		n=215+c+d;
	else if(b==10)
		n=245+c+d;
	else if(b==11)
		n=276+c+d;
	else if(b==12)
		n=306+c+d;
	printf("%d\n",n);
		return 0;

}
int main(int argc, char* argv[])
{
	int a,b,c,i,s1=0,s2;
    int n[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d",&a,&b,&c);
    if(a%400==0 || (a%4==0 && a%100!=0))	
		n[1]=29;
	for(i=1;i<b;i++)	
		s1=s1+n[i-1];
	s2=s1+c;
	printf("%d\n",s2);
	return 0;
}
void main()
{
	int sum_day(int,int);
	int leap(int year);
	int year,month,day,days;
	scanf("%d%d%d",&year,&month,&day);
	days=sum_day(month,day);
	if(leap(year)&&month>=3)
		days=days+1;
	printf("%d",days);
}
int sum_day(int month,int day)
{
	int day_tab[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int i;
	for(i=1;i<month;i++)
		day+=day_tab[i];
	return(day);
}
int leap(int year)
{
	int leap;
	leap=year%3==0&&year%100!=0||year%400==0;
	return(leap);
}
main()
{
    int year,month,day,sum=0;
    int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    scanf("%d %d %d",&year,&month,&day);
    if(((year%4==0)&&(year%100!=0))||(year%400==0))          // when this year is a leap year.
    {
        if(month>2)    // when >=3 month
        {
              sum=sum+29+31;
              for(int k=3;k<month;k++)
              {
                  sum=sum+d[k];    
              }  
              sum=sum+day;       
        }   
        else if(month==2)
        {
            sum=31+day;
        }                
        else
        {
            sum=day;
        }  
      
    }
    else                // when this year is not a leap year.
    {
        if(month>2)    // when >=3 month
        {
              sum=sum+28+31;
              for(int k=3;k<month;k++)
              {
                  sum=sum+d[k];    
              }  
              sum=sum+day;       
        }   
        else if(month==2)
        {
            sum=31+day;
        }                
        else
        {
            sum=day;
        }  
    }
    printf("%d",sum);
    getchar();
    getchar(); 
    getchar();
}
int main()
{
    int y,m,d;
    int t;
    scanf("%d %d %d",&y,&m,&d);
    if(y%400==0||(y%4==0&&y%100!=0))
    {
      switch(m)
      {
             case 1:t=0;break;
             case 2:t=31;break;
             case 3:t=60;break;
             case 4:t=91;break;
             case 5:t=121;break;
             case 6:t=152;break;
             case 7:t=182;break;
             case 8:t=213;break;
             case 9:t=244;break;
             case 10:t=274;break;
             case 11:t=305;break;
             case 12:t=335;
      }
    }
    else
    {
      switch(m)
      {
             case 1:t=0;break;
             case 2:t=31;break;
             case 3:t=59;break;
             case 4:t=90;break;
             case 5:t=120;break;
             case 6:t=151;break;
             case 7:t=181;break;
             case 8:t=212;break;
             case 9:t=243;break;
             case 10:t=273;break;
             case 11:t=304;break;
             case 12:t=334;
      }
    }
    t+=d;
    printf("%d",t);
    return 0;
}
int main(int argc, char* argv[])
{
	int x,y,z,d;
	scanf("%d %d %d",&x,&y,&z);
	if((x%100!=0&&x%4==0)||(x%100==0&&x%400==0)){
		switch(y){
		case 1:d=z;break;
		case 2:d=z+31;break;
		case 3:d=z+31+29;break;
        case 4:d=z+31+29+31;break;
		case 5:d=z+31+29+31+30;break;
		case 6:d=z+31+29+31+30+31;break;
		case 7:d=z+31+29+31+30+31+30;break;
		case 8:d=z+31+29+31+30+31+30+31;break;
		case 9:d=z+31+29+31+30+31+30+31+31;break;
		case 10:d=z+31+29+31+30+31+30+31+31+30;break;
		case 11:d=z+31+29+31+30+31+30+31+31+30+31;break;
		case 12:d=z+31+29+31+30+31+30+31+31+30+31+30;break;
		default:
			;
		}
	}
	else{
		switch(y){
		case 1:d=z;break;
		case 2:d=z+31;break;
		case 3:d=z+31+28;break;
        case 4:d=z+31+28+31;break;
		case 5:d=z+31+28+31+30;break;
		case 6:d=z+31+28+31+30+31;break;
		case 7:d=z+31+28+31+30+31+30;break;
		case 8:d=z+31+28+31+30+31+30+31;break;
		case 9:d=z+31+28+31+30+31+30+31+31;break;
		case 10:d=z+31+28+31+30+31+30+31+31+30;break;
		case 11:d=z+31+28+31+30+31+30+31+31+30+31;break;
		case 12:d=z+31+28+31+30+31+30+31+31+30+31+30;break;
		default:
			;
		}
	}
	printf("%d\n",d);
	return 0;
}
int main(int argc, char* argv[])
{
	int year,month,day;
	int n;

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

	if((year%4==0&&year%100!=0)||year%400==0)
	{
		if(month==1)
		{
			n=day;
			printf("%d",n);
		}
		if(month==2)
		{
			n=31+day;
		    printf("%d",n);
		}
		if(month==3)
		{
			n=31+29+day;
		    printf("%d",n);
		}
		if(month==4)
		{
			n=31+29+31+day;
		    printf("%d",n);
		}	
		if(month==5)
		{
			n=31+29+31+30+day;
		    printf("%d",n);
		}
		if(month==6)
		{
			n=31+29+31+30+31+day;
		    printf("%d",n);
		}
		if(month==7)
		{
			n=31+29+31+30+31+30+day;
		    printf("%d",n);
		}
		if(month==8)
		{
			n=31+29+31+30+31+30+31+day;
		    printf("%d",n);
		}
		if(month==9)
		{
			n=31+29+31+30+31+30+31+31+day;
		    printf("%d",n);
		}
		if(month==10)
		{
			n=31+29+31+30+31+30+31+31+30+day;
		    printf("%d",n);
		}
		if(month==11)
		{
			n=31+29+31+30+31+30+31+31+30+31+day;
		    printf("%d",n);
		}
		if(month==12)
		{
			n=31+29+31+30+31+30+31+31+30+31+30+day;
		    printf("%d",n);
		}
	}
	else
	{
		if(month==1)
		{
			n=day;
			printf("%d",n);
		}
		if(month==2)
		{
			n=31+day;
		    printf("%d",n);
		}
		if(month==3)
		{
			n=31+28+day;
		    printf("%d",n);
		}
		if(month==4)
		{
			n=31+28+31+day;
		    printf("%d",n);
		}	
		if(month==5)
		{
			n=31+28+31+30+day;
		    printf("%d",n);
		}
		if(month==6)
		{
			n=31+28+31+30+31+day;
		    printf("%d",n);
		}
		if(month==7)
		{
			n=31+28+31+30+31+30+day;
		    printf("%d",n);
		}
		if(month==8)
		{
			n=31+28+31+30+31+30+31+day;
		    printf("%d",n);
		}
		if(month==9)
		{
			n=31+28+31+30+31+30+31+31+day;
		    printf("%d",n);
		}
		if(month==10)
		{
			n=31+28+31+30+31+30+31+31+30+day;
		    printf("%d",n);
		}
		if(month==11)
		{
			n=31+28+31+30+31+30+31+31+30+31+day;
		    printf("%d",n);
		}
		if(month==12)
		{
			n=31+28+31+30+31+30+31+31+30+31+30+day;
		    printf("%d",n);
		}
	}
	return 0;
}
int main()
{
	int year,month,day;
	scanf("%d%d%d",&year,&month,&day);
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int sum=0;
	int i;

	
	

	
	for (i=0;i<month;i++)
		{
			sum+=a[i-1];
		}
		sum=sum+day;
		

	if ((year%4==0 && year%100!=0)|| year%400==0)
	{
		if (month<=2)
		{
			printf("%d\n",sum);
		}
		if (month>2)
		{
			sum=sum+1;
			printf("%d\n",sum);
		}
	}
	else

		printf("%d\n",sum);
	return 0;
}
int main(){
	int a,b,c,d;
	cin>>a>>b>>c;
	if((a%4==0&&a%100!=0)||a%400==0){
		int m[13]={0,31,60,91,121,151,182,213,244,274,305,335,366};
		d=m[b-1]+c;}
	else {int m[13]={0,31,59,90,120,150,181,212,243,273,304,334,365};
		d=m[b-1]+c;}
	cout<<d;return 0;}
int main()
{
	int year, month, day;
	int monthday[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d", &year, &month, &day);
	int i;
	int sum=0;
	for(i=1; i<month; i++)
	{
		sum=sum+monthday[i-1];
	}
	sum=sum+day;
	int a;
	a=year%4;
	if(month>2 && (a==0 && year%100!=0 || year%400==0))
	{
		sum=sum+1;
	}
	printf("%d", sum);
	return 0;
}
int mon( int n){
	int day ;
	switch(n){
		case 1 : day = 31 ; break ;
		case 2 : day = 28 ; break ;
		case 3 : day = 31 ; break ;
		case 4 : day = 30 ; break ;
		case 5 : day = 31 ; break ;
		case 6 : day = 30 ; break ;
		case 7 : day = 31 ; break ;
		case 8 : day = 31 ; break ;
		case 9 : day = 30 ; break ;
		case 10: day = 31 ; break ;
		case 11: day = 30 ; break ;
		case 12: day = 31 ; break ;
	}
	return(day);
}
int run(int year){
	int p ;
	if( year % 400 == 0 ) p = 1 ;
	else if( ( year % 100 != 0 ) && ( year % 4 == 0 ) ) p = 1 ;
	else p = 0 ;
	return (p) ;
}

int main(){
	int year , month , date , i , n = 0 ;
	scanf("%d%d%d" , &year , &month , &date );
	for (i = 1 ; i <= month - 1 ; i++){
		n = n + mon(i) ;
	}
	n = n + date ;
	if ( run(year) == 1 ) n = n + 1 ;
	else n = n ;
	printf("%d" , n);

	return(0);
}
int main(int argc, char* argv[])
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	int d[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    if((a%4==0&&a%100!=0)||a%400==0)
	{
		d[1]++;
	}
	int g=c;
	int i=0;
	while(i>=b)
	{
		d[i]++;
	}
	for(i=0;i<b-1;i++)
	{
		g=g+d[i];
	}
    printf("%d",g);
	return 0;
}
int main()
{
 int i,year,month,date,count=0,day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
 cin>>year>>month>>date;
 for(i=1;i<month;i++)
  count+=day[i];
 count+=date;
 if(month>2)
  if((year%400==0)||((year%100!=0)&&(year%4==0)))
   count++;
 cout<<count;
 return 0;
}
int main()
{
 int year,month,day;
 scanf("%d %d %d",&year,&month,&day);
 if((year%4==0&&year%100!=0)||(year%400==0))
  {
   if(month==1)
    printf("%d",day);
   else if(month==2)
    printf("%d",31+day);
   else if(month==3)
    printf("%d",31+29+day);
   else if(month==4)
    printf("%d",31+29+31+day);
   else if(month==5)
    printf("%d",31+29+31+30+day);
   else if(month==6)
    printf("%d",31+29+31+30+31+day);
   else if(month==7)
    printf("%d",31+29+31+30+31+30+day);
   else if(month==8)
    printf("%d",31+29+31+30+31+30+31+day);
   else if(month==9)
    printf("%d",31+29+31+30+31+30+31+31+day);
   else if(month==10)
    printf("%d",31+29+31+30+31+30+31+31+30+day);
   else if(month==11)
    printf("%d",31+29+31+30+31+30+31+31+30+31+day);
   else
    printf("%d",31+29+31+30+31+30+31+31+30+31+30+day);
  }
 else
  {
   if(month==1)
    printf("%d",day);
   else if(month==2)
    printf("%d",31+day);
   else if(month==3)
    printf("%d",31+28+day);
   else if(month==4)
    printf("%d",31+28+31+day);
   else if(month==5)
    printf("%d",31+28+31+30+day);
   else if(month==6)
    printf("%d",31+28+31+30+31+day);
   else if(month==7)
    printf("%d",31+28+31+30+31+30+day);
   else if(month==8)
    printf("%d",31+28+31+30+31+30+31+day);
   else if(month==9)
    printf("%d",31+28+31+30+31+30+31+31+day);
   else if(month==10)
    printf("%d",31+28+31+30+31+30+31+31+30+day);
   else if(month==11)
    printf("%d",31+28+31+30+31+30+31+31+30+31+day);
   else
    printf("%d",31+28+31+30+31+30+31+31+30+31+30+day);                                         
  }
 printf("\n");
  getchar();
  return 0;   
}
int main()
{
	int year,month,date;
	int sum=0;
	scanf("%d%d%d",&year,&month,&date);
	int temp;
	if(year%4!=0)
		{
		temp=28;//not
		}
		else if(year%100!=0)
		{
			temp=29;//yes
		}
		else if(year%400!=0)
		{
			temp=28;//not
		}
		else
		{
			temp=29;//yes
		}//???????
		int a[12]={31,temp,31,30,31,30,31,31,30,31,30,31};
		int i;
		for(i=0;i<month-1;i++)
		{
			sum+=a[i];
		}
		sum+=date;
		printf("%d",sum);
		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:printf("%d",d);break;
           case 2:printf("%d",31+d);break;
           case 3:printf("%d",60+d);break;
           case 4:printf("%d",91+d);break;
           case 5:printf("%d",121+d);break;
           case 6:printf("%d",152+d);break;          
           case 7:printf("%d",182+d);break;
           case 8:printf("%d",213+d);break;
           case 9:printf("%d",244+d);break;
           case 10:printf("%d",274+d);break;
           case 11:printf("%d",305+d);break;
           case 12:printf("%d",335+d);break;
           }             
    }
    else
        {
           switch(m)
           {
           case 1:printf("%d",d);break;
           case 2:printf("%d",31+d);break;
           case 3:printf("%d",59+d);break;
           case 4:printf("%d",90+d);break;
           case 5:printf("%d",120+d);break;
           case 6:printf("%d",151+d);break;          
           case 7:printf("%d",181+d);break;
           case 8:printf("%d",212+d);break;
           case 9:printf("%d",243+d);break;
           case 10:printf("%d",273+d);break;
           case 11:printf("%d",304+d);break;
           case 12:printf("%d",334+d);break;
           }             
    }
   
    }
int leap(int);
int main()
{
	int daymonth[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 YEAR,MON,DAY,i,counter=0;
	cin>>YEAR>>MON>>DAY;
	for(i=0;i<MON-1;i++)
	{
		counter+=daymonth[leap(YEAR)][i];
	}
	counter+=DAY;
	cout<<counter<<endl;
	return 0;
}
int leap(int YEAR)
{
	if((YEAR%4==0)&&(YEAR%100!=0)||(YEAR%400==0))
			return 1;
	else
		return 0;
}