semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int check(int a);
    int count(int x[], int w, int y);
    int year, month, day;
    scanf("%d%d%d", &year, &month, &day);
    
    int k;
    int sum;
    k=check(year);
    if(k==1)
    {
           int days1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
           sum=count(days1, month, day);
           printf("%d", sum);
    }
    else
    {
          int days2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
          sum=count(days2, month, day);
           printf("%d", sum);
    }
    
    
    return 0;
}

    int check(int a)
    {
        int b,c,d;
        b = a%4;
        c = a%100;
        d = a%400;
        if (b!=0)
        {
             return 1;
        }
        else if(c==0&&d!=0)
        {
             return 1;
        }
        else return 0;

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

   
	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;
	printf("%d",result);
	return 0;
}
int main()
{
    int i,n,j,k,a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},sum=0;
    scanf("%d %d %d",&n,&j,&k);
    for(i=0;i<=j-1;i++)
    {
                    sum=sum+a[i];
    }
    if(n%400==0||(n%4==0&&n%100!=0))
    {
                                    if(j<=2)
                                    {
                                            sum=sum+k;
                                    }
                                    else
                                    {
                                        sum=sum+1+k;
                                    }
    }
    else
    {
        sum=sum+k;
    }
    printf("%d",sum);
    getchar();
    getchar();
    getchar();
    
}
int main()
{
   int year,month,day;
   int i;
   int a=0;
   int b=0;
   scanf("%d %d %d",&year,&month,&day);
   int N1[13]={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 
   int N2[13]={0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 
   if((year % 4 == 0 && year % 100 !=0 ) || (year % 400 == 0))
   {
	   if(day<1||day>N2[month])
	   {
		   printf("wrong\n");
		   return -1;
	   }
	  else
	  {
		  for(i=1;i<=month;i++)
	  {
		  a+=N2[i];
	  }
	  b=a-day;
	  }
   }
  else
  {
      if(day<1||day>N1[month])
	   {
		   printf("wrong\n");
		   return -1;
	   }
	  else
	  {
	  for(i=1;i<=month;i++)
	  {
		  a+=N1[i];
	  }
	  b=a-day;
	  }
}
	  printf("%d\n",b);
	  return 0;
}
int rennian(int y)
{
	if((y%4==0&&y%100!=0)||y%400==0)
		return 1;
	else
		return 0;
}
int main()
{
	int y,m,d,i,a=0,b;
	scanf("%d %d %d",&y,&m,&d);	
	int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if(rennian(y)==1)
	{
		days[2]++;
	}
	for(i=0;i<m;i++)
	{
		a+=days[i];
	}
	b=a+d;
    printf("%d",b);
	return 0;
}
int main()
{
	int a,b,c,n;
	scanf("%d%d%d",&a,&b,&c);
	if((a%4==0 && a%100!=0) || a%400==0)
	{
		if(b==1)
		{
			printf("%d\n",c);
		}
		else if(b==2)
		{
			n=31+c;
			printf("%d\n",n);
		}
		else if(b==3)
		{
			n=60+c;
			printf("%d\n",n);
		}
		else if(b==4)
		{
			n=91+c;
			printf("%d\n",n);
		}
		else if(b==5)
		{
			n=121+c;
			printf("%d\n",n);
		}
		else if(b==6)
		{
			n=152+c;
			printf("%d\n",n);
		}
		else if(b==7)
		{
			n=182+c;
			printf("%d\n",n);
		}
		else if(b==8)
		{
			n=213+c;
			printf("%d\n",n);
		}
		else if(b==9)
		{
			n=244+c;
			printf("%d\n",n);
		}
		else if(b==10)
		{
			n=274+c;
			printf("%d\n",n);
		}
		else if(b==11)
		{
			n=305+c;
			printf("%d\n",n);
		}
		else if(b==12)
		{
			n=336+c;
			printf("%d\n",n);
		}
	}
	else
	{
		if(b==1)
		{
			printf("%d\n",c);
		}
		else if(b==2)
		{
			n=31+c;
			printf("%d\n",n);
		}
		else if(b==3)
		{
			n=59+c;
			printf("%d\n",n);
		}
		else if(b==4)
		{
			n=90+c;
			printf("%d\n",n);
		}
		else if(b==5)
		{
			n=120+c;
			printf("%d\n",n);
		}
		else if(b==6)
		{
			n=151+c;
			printf("%d\n",n);
		}
		else if(b==7)
		{
			n=181+c;
			printf("%d\n",n);
		}
		else if(b==8)
		{
			n=212+c;
			printf("%d\n",n);
		}
		else if(b==9)
		{
			n=243+c;
			printf("%d\n",n);
		}
		else if(b==10)
		{
			n=273+c;
			printf("%d\n",n);
		}
		else if(b==11)
		{
			n=304+c;
			printf("%d\n",n);
		}
		else if(b==12)
		{
			n=335+c;
			printf("%d\n",n);
		}
	}
	return 0;
}
void main()
{
	int year,mon,date,day=0;
	scanf("%d%d%d",&year,&mon,&date);
	switch(mon)
	{
	case 1:day=date;break;
	case 2:day=31+date;break;
	case 3:day=31+28+date;break;
	case 4:day=31+28+31+date;break;
	case 5:day=31+28+31+30+date;break;
	case 6:day=31+28+31+30+31+date;break;
	case 7:day=31+28+31+30+31+30+date;break;
	case 8:day=31+28+31+30+31+30+31+date;break;
	case 9:day=31+28+31+30+31+30+31+31+date;break;
	case 10:day=31+28+31+30+31+30+31+31+30+date;break;
    case 11:day=31+28+31+30+31+30+31+31+30+31+date;break;
	case 12:day=31+28+31+30+31+30+31+31+30+31+30+date;break;
	}
	if((year%4==0&&year%100!=0)||(year%400==0))
	{
		if(mon>2)
			day++;
	}
	printf("%d",day);



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

int main() 
{ 
  int year, month, day;
  int z=1;
  while (z<=5)
  {
  scanf("%d %d %d", &year, &month, &day);  
  int n = 0;  
  int i; 
  for (i = 1; i < month; i++) 
  { 
    n =n+ days[i]; 
  } 
  n =n+ day;  
  if (month > 2 && isleapyear(year)) 
  n++; 
  printf("%d\n",n);
  z++;
  }
}
int main(int argc, char* argv[])
{
	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 main()
{
	int year, mon, d;
	int month = 1, day = 1, lunar = 0, days = 1;
	cin >> year >> mon >> d;
	if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
		lunar = 1;
	while ((mon != month) || (d != day))
	{
		day++;
		days++;
		if ((day==32)&&((month==1)||(month==3)||(month==5)||(month==7)||(month==8)||(month==10)||(month==12))) 
				{
					month++;
					day=1;
			    }
			if ((day==31)&&((month==4)||(month==6)||(month==9)||(month==11)))
			    {
					month++;
					day=1;
			    }
			if ((day==30)&&(month==2)&&(lunar==1))
			    {
					month++;
					day=1;
			    }
			if ((day==29)&&(month==2)&&(lunar==0))
			    {
					month++;
					day=1;
			    }
	}
	cout << days << endl;
	return 0;
}
int main(int argc, char* argv[])
{
	int year,month,day,date;
	int a,b,c,e,g,h,j;
	int d,f,i,k;

    a=c=e=g=h=j=31;
    d=f=i=k=30;

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

	if((year%4!=0)||(year%100==0&&year%400!=0))
		b=28;
	else
		b=29;

	switch(month){
	case 1:day=date;break;
	case 2:day=a+date;break;
	case 3:day=a+b+date;break;
	case 4:day=a+b+c+date;break;
	case 5:day=a+b+c+d+date;break;
	case 6:day=a+b+c+d+e+date;break;
	case 7:day=a+b+c+d+e+f+date;break;
	case 8:day=a+b+c+d+e+f+g+date;break;
	case 9:day=a+b+c+d+e+f+g+h+date;break;
	case 10:day=a+b+c+d+e+f+g+h+i+date;break;
	case 11:day=a+b+c+d+e+f+g+h+i+j+date;break;
	case 12:day=a+b+c+d+e+f+g+h+i+j+k+date;break;}

	printf("%d\n",day);
	return 0;
}
int main()
{
    int y, m, d, i, sum, n=0, k[13];
    scanf("%d %d %d" , &y, &m, &d);
    k[0]=0;
    k[1]=k[3]=k[5]=k[7]=k[8]=k[10]=k[12]=31;
    k[4]=k[6]=k[9]=k[11]=30;
    if(y%4)
    {
       if(y%100)
       {
            if(y%400)
            {
                k[2]=28;   
            }
            else
            {
                k[2]=29;
            }
       }
       else
       {
           k[2]=28;
       }
    }
    else
    {
        k[2]=29;
    }
     for(i=0; i<m; i++)
     {
        n=n+k[i];
     }
     sum=n+d;
     printf("%d\n", sum); 
     return 0;
}
int main()
{
	int x,y,z,k=0,i;
	cin>>x>>y>>z;
	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};
	if((x%4==0&&x%100!=0)||(x%400==0))
		for(i=0;i<y-1;i++)
			k=k+b[i];
	else 
		for(i=0;i<y-1;i++)
			k=k+a[i];
	k=k+z;
	cout<<k;
	return 0;
}
int main()
{
int year[5],month[5],day[5],m,tianshu,i;
for(i=0;i<=4;i++)
{scanf("%d%d%d",&year[i],&month[i],&day[i]);}
for(i=0;i<=4;i++)
{switch(month[i])
        {case 1:m=0;break;
	case 2:m=31;break;
	case 3:m=59;break;
        case 4:m=90;break;
	case 5:m=120;break;
	case 6:m=151;break;
	case 7:m=181;break;
	case 8:m=212;break;
	case 9:m=243;break;
	case 10:m=273;break;
	case 11:m=304;break;
	case 12:m=334;break;}
        if((year[i]%400==0)||(year[i]%4==0&&year[i]%100!=0)) 
	      if (m>31)m=m+1;
tianshu=m+day[i];
printf("%d\n",tianshu);}
return 0;
}
int main()
{
	int a,b,c,n;
	scanf("%d%d%d",&a,&b,&c);
	if ((a%4)==0&&a%100!=0||(a%400)==0){
		switch(b){
		case 1:
			n=c;
			printf("%d",n);
			break;
		case 2:
		    n=31+c;
            printf("%d",n);
			break;
        case 3:
			n=31+29+c;
            printf("%d",n);
			break;
		case 4:
			n=31+29+31+c;
        	printf("%d",n);
			break;
		case 5:
			n=31+29+31+30+c;
	        printf("%d",n);
			break;
        case 6:
			n=31+29+31+30+31+c;
            printf("%d",n);
			break;
        case 7:
			n=31+29+31+30+31+30+c;
	     	printf("%d",n);
			break;
        case 8:
			n=31+29+31+30+31+30+31+c;
        	printf("%d",n);
			break;
		case 9:
			n=31+29+31+30+31+30+31+31+c;
	        printf("%d",n);
			break;
		case 10:
			n=31+29+31+30+31+30+31+31+30+c;
            printf("%d",n);
			break;
        case 11: 
			n=31+29+31+30+31+30+31+31+30+31+c;
          	printf("%d",n);
			break;
		case 12:
            n=31+29+31+30+31+30+31+31+30+31+30+c;
	        printf("%d",n);
			break;
		}
	}
	else 
	switch(b){
		case 1:
			n=c;
			printf("%d",n);
			break;
		case 2:
		    n=31+c;
            printf("%d",n);
			break;
        case 3:
			n=31+28+c;
            printf("%d",n);
			break;
		case 4:
			n=31+28+31+c;
        	printf("%d",n);
			break;
		case 5:
			n=31+28+31+30+c;
	        printf("%d",n);
			break;
        case 6:
			n=31+28+31+30+31+c;
            printf("%d",n);
			break;
        case 7:
			n=31+28+31+30+31+30+c;
	     	printf("%d",n);
			break;
        case 8:
			n=31+28+31+30+31+30+31+c;
        	printf("%d",n);
			break;
		case 9:
			n=31+28+31+30+31+30+31+31+c;
	        printf("%d",n);
			break;
		case 10:
			n=31+28+31+30+31+30+31+31+30+c;
            printf("%d",n);
			break;
        case 11: 
			n=31+28+31+30+31+30+31+31+30+31+c;
          	printf("%d",n);
			break;
		case 12:
            n=31+28+31+30+31+30+31+31+30+31+30+c;
	        printf("%d",n);
			break;
	}
	return 0;
}
int main()
{
	int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;
	
	scanf("%d%d%d",&a,&b,&c);

	d=31+c;
	e=59+c;
	f=90+c;
	g=120+c;
	h=151+c;
	i=181+c;
	j=212+c;
	k=243+c;
	l=273+c;
	m=304+c;
	n=334+c;
	o=60+c;
	p=91+c;
	q=121+c;
	r=152+c;
	s=182+c;
	t=213+c;
	u=244+c;
	v=274+c;
	w=305+c;
	x=335+c;



	if(b==1)
		printf("%d",c);
	if(b==2)
		printf("%d",d);
	if((b==3)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",e);
	if((b==4)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",f);
	if((b==5)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",g);
	if((b==6)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",h);
	if((b==7)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",i);
	if((b==8)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",j);
	if((b==9)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",k);
	if((b==10)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",l);
	if((b==11)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
		printf("%d",m);
	if((b==12)&&(a%100!=0&&a%4!=0||a%100==0&&a%400!=0))
	    printf("%d",n);
	if((b==3)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",o);
	if((b==4)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",p);
	if((b==5)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",q);
	if((b==6)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",r);
	if((b==7)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",s);
	if((b==8)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",t);
	if((b==9)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",u);
	if((b==10)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",v);
	if((b==11)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",w);
	if((b==12)&&(a%100!=0&&a%4==0||a%400==0))
		printf("%d",x);
    return 0;
}
int main()
{
	int year,month,day,sum,i;
	int a[12];
	scanf("%d %d %d",&year,&month,&day);
	sum=0;
	a[0]=a[2]=a[4]=a[6]=a[7]=a[9]=a[11]=31;
	a[3]=a[5]=a[8]=a[10]=30;
	if((year%4!=0)||((year%100==0)&&(year%400!=0))) a[1]=28;
	else a[1]=29;
	for(i=0;i<month-1;i++)
	{
		sum+=a[i];
	}
	sum=sum+day;
	printf("%d\n",sum);
	return 0;
}
int main()
{
	int y,m,d,i;
	scanf("%d%d%d",&y,&m,&d);
	if (((y%4==0)&&(y%100!=0))||(y%400==0))
	{

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

	}else
	{	
		switch (m)
	{ 
		case 1:
		    i=d;break;
		case 2:
			i=31+d;break;
		case 3:
			i=31+28+d;break;
		case 4:
			i=31+28+31+d;break;
		case 5:
			i=31+28+31+30+d;break;
		case 6:
        	i=31+28+31+30+31+d;break;
		case 7:
	        i=31+28+31+30+31+30+d;break;
		case 8:
            i=31+28+31+30+31+30+31+d;break;
		case 9:
			i=31+28+31+30+31+30+31+31+d;break;
		case 10:
	        i=31+28+31+30+31+30+31+31+30+d;break;
		case 11:
             i=31+28+31+30+31+30+31+31+30+31+d;break;
		case 12:
             i=31+28+31+30+31+30+31+31+30+31+30+d;break;
	
	}
	}
	printf("%d\n",i);
	return 0;
}
int main()
{
	int year;
	short month,day,result=0,i=1;
	char odd;
	while(i<=5)
	{
		scanf("%d%hd%hd",&year,&month,&day);
		odd=year%400==0||year%4==0&&year%100!=0?1:0;
		switch(month)
		{
			case 12:result+=30;
			case 11:result+=31;
			case 10:result+=30;
			case 9: result+=31;
			case 8: result+=31;
			case 7: result+=30;
			case 6: result+=31;
			case 5: result+=30;
			case 4: result+=31;
			case 3: result+=28;
			case 2: result+=31;
			case 1:	;
		}
		if(month>=3)	result+=odd;
		result+=day;
		printf("%hd\n",result);
		result=0;
		i++;
	}
	return(0);
}
int main()
{
	int a,m,d,i,b[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},c[13]={0,31,29,31,30,31,30,31,31,30,31,30,31},s=0;
	cin >> a >> m >> d;
	if(a%4!=0 || (a%100==0 && a%400!=0))
		for(i=1;i<m;i++)
			s+=b[i];
	else
		for(i=1;i<m;i++)
			s+=c[i];
	cout << s+d;
	return 0;
}