semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
int y,m,d,i,x=0;
int mon[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)
{
mon[1]=29;
}
else if(y%400==0)
{
mon[1]=29;
}
else
mon[1]=28;

for(i=0;i<m-1;i++)
	{
		x+=mon[i];
	}
x=x+d;
printf("%d\n",x);
return 0;
}
int main()
{
	int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int year,month,day;
	int isleapyear;
	scanf("%d%d%d",&year,&month,&day);
	
	isleapyear=(year%4==0&&year%100!=0)||year%400==0;
	if (isleapyear&& month == 2 && (day < 1 || day > 29)) 
	{ 
    		printf("Illegal input.\n"); 
    		return -1; 
	} 
	if (isleapyear&& month != 2 && (day < 1 || day > days[month]))
	{ 
    		printf("Illegal input.\n"); 
    		return -1; 
	} 
	if (!isleapyear&& (day < 1 || day > days[month])) 
	{ 
    		printf("Illegal input.\n"); 
   		 return -1; 
	} 


	int n=0;
	int i;
	for(i=0;i<month;i++)
		{
		n+=days[i];
		}
	n+=day;
	if(month>2&&isleapyear)
		n++;
	printf("%d",n);
	return 0;
}
int main()
{
	int y,m,d,s=0;
	scanf("%d %d %d",&y,&m,&d);
	if(m==1) s=d;
	else if(m==2) s=31+d;
	else if(m==3) s=60+d;
	else if(m==4) s=91+d;
	else if(m==5) s=121+d;
	else if(m==6) s=152+d;
	else if(m==7) s=182+d;
	else if(m==8) s=213+d;
	else if(m==9) s=244+d;
	else if(m==10) s=274+d;
	else if(m==11) s=305+d;
	else if(m==12) s=335+d;
	if(m>=3)
	{
		if(y%100==0)
		{
		    if(y%400==0)
			{
			    printf("%d",s);
			}
		    else
		        printf("%d",s-1);
		}
	    else if(y%4==0)
		    printf("%d",s);
	    else if(y%4!=0)
		    printf("%d",s-1);
	}
	else
		printf("%d",s);
	return 0;
}
int main(){
	int y,m,d,i,D;
	int p[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    D=0;
	scanf("%d%d%d",&y,&m,&d);
	if(((y%4==0)&&(y%100!=0))||((y%400)==0)){
		for(i=0;i<m-1;i++){
			D=D+p[i];
		}
		D=D+d+1;
		printf("%d",D);
	}
	else{
		for(i=0;i<m-1;i++){
			D=D+p[i];
		}
		D=D+d;
		printf("%d",D);
	}
	return 0;
	}
int main()
{
    int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int year,month,day,i,num=0;
    scanf("%d%d%d",&year,&month,&day);
    if(year%4==0)
    {
       if(year%100==0&&year%400!=0)
          a[2]=28;
       else if(year%400==0)
          a[2]=29;
       else a[2]=29;
    }
    else a[2]=28;
    for(i=1;i<month;i++)
       num=num+a[i];
    num=num+day;
    printf("%d",num);
    return 0;
}
int main(int argc, char* argv[])
{
	int year, month, date;
	int m=0,n=0;
	scanf("%d %d %d", &year, &month, &date);
	if (month==1)
	{
		n=date;
	}
	m=m+31;
	if (month==2)
	{
		n=m+date;
	}		
	    if ((year%4==0&&year%100!=0)||(year%400==0))
		{
			m=m+29;
		}
		else 
		{
			m=m+28;
		}

	if (month==3)
	{
		n=m+date;
	}
	m=m+31;
	if (month==4)
	{
		n=m+date;
	}
	m=m+30;
	if (month==5)
	{
		n=m+date;
	}
	m=m+31;
	if (month==6)
	{
		n=m+date;
	}
	m=m+30;
	if (month==7)
	{
		n=m+date;
	}
	m=m+31;
	if (month==8)
	{
		n=m+date;
	}
	m=m+31;
	if (month==9)
	{
		n=m+date;
	}
	m=m+30;
	if (month==10)
	{
		n=m+date;
	}
	m=m+31;
	if (month==11)
	{
		n=m+date;
	}
	m=m+30;
	if (month==12)
	{
		n=m+date;
	}
	printf("%d\n", n);
	return 0;
}
int main()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
    if (b==1)
	{
		printf("%d",c);
	}
	if((a%4==0)&&(a%100==0)&&(a%400==0))
	{
		switch (b) 
	{
	case 2 :
	{
		printf("%d",31+c);
		break;
	}
	case 3:
	{
       printf("%d",31+29+c);
	   break;
	}
	case 4:
	{
	   printf("%d",31+29+31+c);
	   break;
	}
	case 5:
		   {
			  printf("%d",31+29+31+30+c);
			  break;
		   }
	case 6:
			   {
				   printf("%d",31+29+31+30+31+c);
				   break;
			   }
	case 7:
				   {
					   printf("%d",31+29+31+30+31+30+c);
					   break;
				   }
	case 8:
					   {
						   printf("%d",31+29+31+30+31+30+31+c);
						   break;
					   }
	case 9:
						   {
							   printf("%d",31+29+31+30+31+30+31+31+c);
							   break;
						   }
	case 10:
							   {
								   printf("%d",31+29+31+30+31+30+31+31+30+c);
								   break;
							   }
	case 11:
								   {
									   printf("%d",31+29+31+30+31+30+31+31+30+31+c);
									   break;
								   }
	case 12:
									   {
										   printf("%d",31+29+31+30+31+30+31+31+30+31+30+c);
										   break;
									   }
		}
	}
		else
		{
     switch(b)
	{
		case 2:
			{
		printf("%d",31+c);
		break;
	}
	   case 3:
	{
       printf("%d",31+28+c);
	   break;
	}
		case 4:
	   {
		   printf("%d",31+28+31+c);
		   break;
	   }
		case 5:
	 {
		 printf("%d",31+28+31+30+c);
		 break;
	 }
		case 6:
	 {
		 printf("%d",31+28+31+30+31+c);
		 break;
	}
		case 7:
	{
		printf("%d",31+28+31+30+31+30+c);
		break;
	 }
		case 8:
	{
		printf("%d",31+28+31+30+31+30+31+c);
		break;
	}
		case 9:
	 {
		printf("%d",31+28+31+30+31+30+31+31+c);
		break;
	 }
						case 10:
							{
								   printf("%d",31+28+31+30+31+30+31+31+30+c);
								   break;
							   }
						case 11:
								   {
									   printf("%d",31+28+31+30+31+30+31+31+30+31+c);
									   break;
								   }
						case 12:
									   {
										   printf("%d",31+28+31+30+31+30+31+31+30+31+30+c);
										   break;
									   }
						}
		}
	return 0;
}
main()
{
      int year,mon,day,f,i,sum=0;
      int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
      scanf("%d %d %d",&year,&mon,&day);
      if(year%4==0&&year%100!=0)
      f=1;
      else if(year%400==0)
      f=1;
      else
      f=0;
      for(i=1;i<mon;i++)
      {
                           sum=sum+a[i-1];                     
      }
      sum=sum+day;
      if(f==1&&mon>2)
      sum=sum+1;
      printf("%d",sum);
      getchar();
      getchar();
}
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,j;
	int sum=0;
	for(i=1;i<month;i++)
	{
	j=i-1;
	sum=sum+monthday[j];
	}
	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 days_of_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 is_leap_year(int year)
{
	if(year%100!=0 && year%4==0 || year%400==0)
		return 1;
	else
		return 0;
}

int main()
{
	int year, month, day;
	scanf("%d%d%d", &year, &month, &day);
	int index = is_leap_year(year);
	int days = 0;
	for(int i=0; i<month-1; i++)
		days += days_of_month[index][i];
	days += day;
	printf("%d", days);
}
int main()
{
    int a,b,c=0;
    int i=0;
    int sum=0;
    scanf("%d %d %d",&a,&b,&c);
    for(i=1;i<b;i++)
    { 
                    sum=sum+30;
                    if(i==1||i==3||i==5||i==7||i==8||i==10)
                    {
                                                            sum=sum+1;
                                                            }
                    else if(i==2&&((a%100!=0&&a%4==0)||a%400==0))
                    {
                                                          sum=sum-1;
                    }
                    else if(i==2&&(a%4!=0||a%100==0&&a%400!=0))
                    {
                                    sum=sum-2;
                                    }
   }
   printf("%d",sum+c);
   return 0;
}
int main(int argc, char* argv[])
{
	int year,month,day;
	int real;
	scanf("%d%d%d",&year,&month,&day);
	if((year%4==0 && year%100!=0) || (year%400==0))
	{
	       if(month==1)
		   {
	           printf("%d",day);
		   }
	       if(month==2)
		   {
	           real=31+day;
		       printf("%d",real);
		   }
	       if(month==3)
		   {
	           real=31+29+day;
		       printf("%d",real);
		   }
	       if(month==4)
		   {
	           real=31+29+31+day;
		       printf("%d",real);
		   }
	       if(month==5)
		   {
	           real=31*2+30+29+day;
		       printf("%d",real);
		   }
	       if(month==6)
		   {
	           real=31*3+30+29+day;
		       printf("%d",real);
		   }
	       if(month==7)
		   {
	           real=31*3+30*2+29+day;
		       printf("%d",real);
		   }
	       if(month==8)
		   {
	           real=31*4+30*2+29+day;
		       printf("%d",real);
		   }
	       if(month==9)
		   {
	           real=31*5+30*2+29+day;
		       printf("%d",real);
		   }
	       if(month==10)
		   {
	           real=31*5+30*3+29+day;
		       printf("%d",real);
		   }
	       if(month==11)
		   {
	           real=31*6+30*3+29+day;
		       printf("%d",real);
		   }
	       if(month==12)
		   {
	           real=31*6+30*4+29+day;
		       printf("%d",real);
		   }

	}
	   else
	   {
	       if(month==1)
		   {
	           printf("%d",day);
		   }
	       if(month==2)
		   {
	           real=31+day;
		       printf("%d",real);
		   }
	       if(month==3)
		   {
	           real=31+28+day;
		       printf("%d",real);
		   }
	       if(month==4)
		   {
	           real=31+28+31+day;
		       printf("%d",real);
		   }
	       if(month==5)
		   {
	           real=31*2+30+28+day;
		       printf("%d",real);
		   }
	       if(month==6)
		   {
	           real=31*3+30+28+day;
		       printf("%d",real);
		   }
	       if(month==7)
		   {
	           real=31*3+30*2+28+day;
		       printf("%d",real);
		   }
	       if(month==8)
		   {
	           real=31*4+30*2+28+day;
		       printf("%d",real);
		   }
	       if(month==9)
		   {
	           real=31*5+30*2+28+day;
		       printf("%d",real);
		   }
	       if(month==10)
		   {
	           real=31*5+30*3+28+day;
		       printf("%d",real);
		   }
	       if(month==11)
		   {
	           real=31*6+30*3+28+day;
		       printf("%d",real);
		   }
	       if(month==12)
		   {
	           real=31*6+30*4+28+day;
		       printf("%d",real);
		   }
	   }
	return 0;
}
int main()
{
	int a,b,c,n,s[12],i,t;
	scanf ("%d %d %d",&a,&b,&c);
	s[0]=31;
	s[2]=31;
	s[3]=30;
	s[4]=31;
	s[5]=30;
	s[6]=31;
	s[7]=31;
	s[8]=30;
	s[9]=31;
	s[10]=30;
	s[11]=31;
	t=0;
	for(i=0;i<b-1;i++)
	{
	    if ((a%4==0&&a%100!=0)||a%400==0)
		{
			s[1]=29;
			t=s[i]+t;
		}		
		else 
		{
			s[1]=28;
			t=s[i]+t;
		 }	
	} 
		    n=t+c;
			printf("%d\n",n);	
		

	return 0;
}
int main()
{
	int year,month,day,n;
	scanf("%d%d%d",&year,&month,&day);
	switch(month)
	{
	case 1:
		{ 
		n=day;
		break;
		}
	
	case 2:
		{
		n=31+day;
		  break;
		}

	case 3: 
		{
		n=59+day;
                  if( (year%4==0&&year%100!=0) || (year%400==0) )
	         {
		    n=n+1;	
	         }
                   else
	         {
		    n=n;
                   }

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




	return 0;
}
int main()
{
	int year,month,day,days,i;
	scanf("%d%d%d",&year,&month,&day);
	if(year%4==0&&year%100==!0)
	{
		switch(month)
		{
		case 1:days=day;
			break;
		case 2:days=31+day;
			break;
		case 3:days=31+29+day;
			break;
		case 4:days=31+29+31+day;
			break;
		case 5:days=31+29+31+30+day;
			break;
		case 6:days=31+31+29+31+30+day;
			break;
		case 7:days=30+31+31+29+31+30+day;
			break;
		case 8:days=31+30+31+31+29+31+30+day;
			break;
		case 9:days=31+31+30+31+31+29+31+30+day;
			break;
		case 10:days=30+31+31+30+31+31+29+31+30+day;
			break;
		case 11:days=31+30+31+31+30+31+31+29+31+30+day;
			break;
		case 12:days=30+31+30+31+31+30+31+31+29+31+30+day;
		default:
			;
		}
	}
	else
		{
		switch(month)
		{
		case 1:days=day;
			break;
		case 2:days=31+day;
			break;
		case 3:days=31+28+day;
			break;
		case 4:days=31+28+31+day;
			break;
		case 5:days=31+28+31+30+day;
			break;
		case 6:days=31+31+28+31+30+day;
			break;
		case 7:days=30+31+31+28+31+30+day;
			break;
		case 8:days=31+30+31+31+28+31+30+day;
			break;
		case 9:days=31+31+30+31+31+28+31+30+day;
			break;
		case 10:days=30+31+31+30+31+31+28+31+30+day;
			break;
		case 11:days=31+30+31+31+30+31+31+28+31+30+day;
			break;
		case 12:days=30+31+30+31+31+30+31+31+28+31+30+day;
		default:
			;
		}
	}
    printf("%d",days);
	return 0;
}
int main()
{
	int i,j,k,m,n;
	scanf("%d%d%d",&i,&j,&k);
	if((i%4==0&&i%100!=0)||(i%100==0&&i%400==0))
	{
		if(j==1)
		{
			m=k;
			printf("%d",m);
		}
		if(j==2)
		{
			m=k+31;
			printf("%d",m);
		}	
		if(j==3)
		{
			m=k+60;
			printf("%d",m);
		}	
		if(j==4)
		{
			m=k+91;
			printf("%d",m);
		}	
		if(j==5)
		{
			m=k+121;
			printf("%d",m);
		}
		if(j==6)
		{
			m=k+152;
			printf("%d",m);
		}
		if(j==7)
		{
			m=k+182;
			printf("%d",m);
		}
		if(j==8)
		{
			m=k+213;
			printf("%d",m);
		}	
		if(j==9)
		{
			m=k+244;
			printf("%d",m);
		}	
		if(j==10)
		{
			m=k+274;
			printf("%d",m);
		}
		if(j==11)
		{
			m=k+305;
			printf("%d",m);
		}	
		if(j==12)
		{
			m=k+335;
			printf("%d",m);
		}
	}
	else
	{
		if(j==1)
		{
			m=k;
			printf("%d",m);
		}
		if(j==2)
		{
			m=k+31;
			printf("%d",m);
		}	
		if(j==3)
		{
			m=k+59;
			printf("%d",m);
		}	
		if(j==4)
		{
			m=k+90;
			printf("%d",m);
		}	
		if(j==5)
		{
			m=k+120;
			printf("%d",m);
		}
		if(j==6)
		{
			m=k+151;
			printf("%d",m);
		}
		if(j==7)
		{
			m=k+181;
			printf("%d",m);
		}
		if(j==8)
		{
			m=k+212;
			printf("%d",m);
		}	
		if(j==9)
		{
			m=k+243;
			printf("%d",m);
		}	
		if(j==10)
		{
			m=k+273;
			printf("%d",m);
		}
		if(j==11)
		{
			m=k+304;
			printf("%d",m);
		}	
		if(j==12)
		{
			m=k+334;
			printf("%d",m);
		}
	}
}
int Year(int a)
{
	if(a%100==0)
	{
		if(a%400==0)
		{
			return 1;
		}
		else
			return 0;
	}
	else if(a%4==0)
	{
		return 1;
	}
	else
		return 0;
}
int main()
{
	int year,month,day,a[13],i,answer;
	cin >>year>>month>>day;
	for(i=1;i<=12;i++)
	{
		switch(i)
		{
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12:
				a[i]=31;break;
			case 4:
			case 6:
			case 9:
			case 11:
				a[i]=30;break;
			case 2:
				if(Year(year)==1)
				{
					a[i]=29;
					break;
				}
				else
				{
					a[i]=28;
					break;
				}
		}
	}
	answer=0;
	for(i=1;i<month;i++)
	{
		answer+=a[i];
	}
	answer+=day;
	cout <<answer<<endl;
	return 0;
}
int main()
{
    int n,y,r,b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int c[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},i,sum=0,q;
    cin>>n>>y>>r;
    if(n%400==0||(n%4==0&&n%100!=0))
    {
                                    for(i=1;i<=y-1;i++)
                                    sum=sum+b[i];
                                    sum=sum+r;
                                    cout<<sum;
    }
    else
    {
        for(i=1;i<=y-1;i++)
                                    sum=sum+c[i];
                                    sum=sum+r;
                                    cout<<sum;
    }
    cin>>q;
    return 0;
}
int main()
{
         int a,b,c,d;
		 scanf("%d%d%d",&a,&b,&c);
		 if(a%4==0&&a%100!=0||a%400==0)
		 {   switch(b)
		 {   case 1:
		 {d=c;
		 break;}
			 case 2:
				 {d=31+c;
				 break;}
			 case 3:
				 {d=31+29+c;
				 break;}
			 case 4:
				 {d=31+29+31+c;
				 break;}
			 case 5:
				 {d=31+29+31+30+c;
				 break;}
			 case 6:
				 {d=31+29+31+30+31+c;
				 break;}
			 case 7:
				 {d=31+29+31+30+31+30+c;
				 break;}
			 case 8:
				 {d=31+29+31+30+31+30+31+c;
				 break;}
             case 9:
				 {d=31+29+31+30+31+30+31+31+c;
				 break;}
			case 10:
				{d=31+29+31+30+31+30+31+31+30+c;
				break;}
			case 11:
				{d=31+29+31+30+31+30+31+31+30+31+c;
				break;}
			case 12:
				{d=31+29+31+30+31+30+31+31+30+31+30+c;
				break;}
		 }
         printf("%d",d);
		 }
		 else
		 { switch(b)
		 {   case 1:
		 {d=c;
		 break;}
			 case 2:
				 {d=31+c;
				 break;}
			 case 3:
				 {d=31+28+c;
				 break;}
			 case 4:
				 {d=31+28+31+c;
				 break;}
			 case 5:
				 {d=31+28+31+30+c;
				 break;}
			 case 6:
				 {d=31+28+31+30+31+c;
				 break;}
			 case 7:
				 {d=31+28+31+30+31+30+c;
				 break;}
			 case 8:
				 {d=31+28+31+30+31+30+31+c;
				 break;}
             case 9:
				 {d=31+28+31+30+31+30+31+31+c;
				 break;}
			case 10:
				{d=31+28+31+30+31+30+31+31+30+c;
				break;}
			case 11:
				{d=31+28+31+30+31+30+31+31+30+31+c;
				break;}
			case 12:
				{d=31+28+31+30+31+30+31+31+30+31+30+c;
				break;}
		 }
             printf("%d",d);
		 }
return 0;
}
int main()
{
    int y,m,d,i,sum;
    int a[12]={31,0,31,30,31,30,31,31,30,31,30,31}; 
    scanf("%d %d %d",&y,&m,&d);
    if((y%4==0&&y%100!=0 )|| y%400 == 0)
    a[1]=29;
    else
    a[1]=28;
    sum=0;
    for(i=0;i<m;i++)
      sum = sum+a[i];
      sum = sum-a[i-1]+d;
    printf("%d",sum);
    getchar();
    getchar();
	return 0;
}
int main()
{
	int a,b,c,d,e;
	scanf("%d%d%d",&a,&b,&c);
	if((a%4==0&&a%100!=0)||(a%400==0))
		d=29;
	else
		d=28;
	switch(b){
	case 1:
			e=c;
			break;
	case 2:
			e=31+c;
			break;
	case 3:
			e=31+d+c;
			break;
	case 4:
			e=62+d+c;
			break;
	case 5:
			e=92+d+c;
			break;
	case 6:
			e=123+d+c;
			break;
	case 7:
			e=153+d+c;
			break;
	case 8:
			e=184+d+c;
			break;
	case 9:
			e=215+d+c;
			break;
	case 10:
			e=245+d+c;
			break;
	case 11:
			e=276+d+c;
			break;
	case 12:
			e=306+d+c;
			break;
	}
	printf("%d",e);
	return 0;
}
int main(int argc, char* argv[])
{
int year,month,days;
scanf("%d %d %d",&year,&month,&days);
	int day;
	if(month==1)
    {
		day=days;
	}
	if(month==2)
	{
	    day=31+days;
	}
        if(month==3)
	{
	      if((year%400==0)||(year%4==0&&year%100!=0))
			  day=31+29+days;
		  else
			  day=31+28+days;
	}	
	if(month==4)
	{
             if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+days;
		  else
			  day=31+28+31+days;  
	}
       if(month==5)
	{
	       if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+days;
		  else
			  day=31+28+31+30+days;
	}
	if(month==6)
	{
        	if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+30+31+31+days;
		  else
			  day=31+28+30+31+31+days;	
	}
	if(month==7)
	{
  	       if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+31+30+days;
		  else
			  day=31+28+31+30+31+30+days;
	}
	if(month==8)
	{
          if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+31+30+31+days;
		  else
			  day=31+28+31+30+31+30+31+days; 
	}
	if(month==9)
	{
	      if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+31+30+31+31+days;
		  else
			  day=31+28+31+30+31+30+31+31+days; 
	}
	if(month==10)
	{
	      if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+31+30+31+31+30+days;
		  else
			  day=31+28+31+30+31+30+31+31+30+days; 
	}
	if(month==11)
	{
	      if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+31+30+31+31+30+31+days;
		  else
			  day=31+28+31+30+31+30+31+31+30+31+days; 
	}
	if(month==12)
	{
	       if((year%4==0&&year%100!=0)||(year%400==0))
			  day=31+29+31+30+31+30+31+31+30+31+30+days;
		  else
			  day=31+28+31+30+31+30+31+31+30+31+30+days; 
	}
    printf("%d\n",day);
	return 0;
}
int main()
{
    int y,m,d,daysum=0;
    cin>>y>>m>>d;
    int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int dayleap[13]={0,31,29,31,30,31,30,31,31,30,31,30,31} ;
    if((y%4!=0)||((y%100==0)&&(y%400!=0)))
    {
      for(int i=0;i<m;i++)
         daysum += day[i];
      daysum += d;
    }
    else
    {
      for(int i=0;i<m;i++)
         daysum += dayleap[i];
      daysum += d;
    }
    cout<<daysum;

    return 0;
}
int main()
{
	struct time
	{
		int year;
		int month;
		int date;
		int dayoftheyear; 
	} nn;
    scanf("%d%d%d",&nn.year,&nn.month,&nn.date);
		if(((nn.year%4==0)&&(nn.year%100==0))||(nn.year%400==0))
		{

           switch(nn.month){
		    case 1:
			nn.dayoftheyear=nn.date;
			break;
			case 2:
			nn.dayoftheyear=nn.date+jan;
			break;
			case 3:
			nn.dayoftheyear=nn.date+jan+feb+1;
			break;
			case 4:
			nn.dayoftheyear=nn.date+jan+feb+mar+1;
			break;
			case 5:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+1;
			break;
			case 6:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+1;
			break;
			case 7:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+1;
			break;
			case 8:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+1;
			break;
			case 9:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+1;
			break;
			case 10:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+sep+1;
			break;
			case 11:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+sep+oct+1;
			break;
			case 12:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+sep+oct+nov+1;
			break;

		}
		}
		   else 
		   {

            switch(nn.month){
		    case 1:
			nn.dayoftheyear=nn.date;
			break;
			case 2:
			nn.dayoftheyear=nn.date+jan;
			break;
			case 3:
			nn.dayoftheyear=nn.date+jan+feb;
			break;
			case 4:
			nn.dayoftheyear=nn.date+jan+feb+mar;
			break;
			case 5:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr;
			break;
			case 6:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may;
			break;
			case 7:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun;
			break;
			case 8:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul;
			break;
			case 9:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug;
			break;
			case 10:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+sep;
			break;
			case 11:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+sep+oct;
			break;
			case 12:
			nn.dayoftheyear=nn.date+jan+feb+mar+apr+may+jun+jul+aug+sep+oct+nov;
			break;

		}
		   }
		printf("%d\n",nn.dayoftheyear);



	return 0;
}
int main()
{
	int a,m,day,i,x;
	cin >> a >> m >> day;
	 switch(m)
	 {
	 case 1:i=0;break;
     case 2:i=31;break;
     case 3:i=31+28;break;
     case 4:i=31+28+31;break;
     case 5:i=31+28+31+30;break;
     case 6:i=31+28+31+30+31;break;
     case 7:i=31+28+31+30+31+30;break;
     case 8:i=31+28+31+30+31+30+31;break;
     case 9:i=31+28+31+30+31+30+31+31;break;
     case 10:i=31+28+31+30+31+30+31+31+30;break;
     case 11:i=31+28+31+30+31+30+31+31+30+31;break;
     case 12:i=31+28+31+30+31+30+31+31+30+31+30;break;
	 default:cout << "error" <<endl;
	 }
	 if ( (a%4==0 && a%100!=0) || (a%400==0) )
	 {
		 if ((m!=1)&&(m!=2))
		 x=i+day+1;
		 else
			 x=i+day;
	 }
	 else 
		 x=i+day;
	 cout << x << endl;
	 return 0;
}
int main(int argc, char* argv[])
{
	int a,b,c,i,s[13],t,n;
	s[0]=0;s[1]=31;s[3]=31;s[4]=30;s[5]=31;s[6]=30;s[7]=31;s[8]=31;s[9]=30;s[10]=31;s[11]=30;s[12]=31;
	t=0;
	scanf("%d %d %d",&a,&b,&c);
	for(i=1;i<b;i++)
	{
		if(a%4==0&&a%100!=0||a%400==0)
		{
			s[2]=29;
		t=s[i]+t;
		}
		else
		{s[2]=28;
		t=s[i]+t;
		}
	}
	n=t+c;
	printf("%d\n",n);
	return 0;
}