semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{

    int startyear,startmonth,startday,endyear,endmonth,endday,i,sum;
    int a[13];
    sum=0;
    scanf("%d%d%d\n%d%d%d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
    for(i=1;i<=12;i++)//??	
	{
		
        if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)	
		{
			a[i]=31; 
		}	
        else if(i==2)	
		{	
            a[i]=28;
		}	
        else if(i==4||i==6||i==9||i==11)	
		{	
            a[i]=30;}	
	} 

     if (startyear==endyear)
	 {	
         while ((startmonth<endmonth)||((startmonth==endmonth)&&(startday<endday)))	
		 {
              if ((startyear%4==0&&startyear%100!=0)||(startyear%400==0))	
			  {	
                   a[2]++;	
			  }	
              startday++;	
              sum=sum+1;	
              if (endday>a[startmonth])	
			  {	
                  startday=0;	//not 1
                  startmonth=startmonth+1; 	
			  }	
		 }
	 }
              else
			  {	
                  for (i=startyear+1;i<=endyear-1;i++)
				  {	
                       if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))	
                       sum=sum+366;	
                       else sum=sum+365;	
				  }
                       sum=sum+a[startmonth]-startday;//the first month	
                       for (i=startmonth+1;i<=12;i++) 
					   {
                           sum=sum+a[i];
					   }
                       if ((startmonth==1)&&((startyear%4==0&&startyear%100!=0)||(startyear%400==0)))
					   {
                            sum++;	
					   }	
                       for (i=1;i<=endmonth-1;i++) 	
					   {	
                           sum=sum+a[i];
					   }
                       if ((endmonth>2)&&((endyear%4==0&&endyear%100!=0)||(endyear%400==0)))
					   {	
                           sum++;	
					   }
                       sum+=endday;
			  }
   printf("%d",sum);
   return 0;
}
struct date
{
	int year;
	int month;
	int day;
} data[3];
int pingrun[3] = {0, 365, 366}, len[3] = {0};
int monthDays[3][13]={{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
int nian, yue, ri,leap[3],jiange[3];
int i, j;
int compute(int,int,int);
void canliang(char[],int);
int main()
{
	long int sum = 0, res;
    data[1].year=data[1].month=data[1].day = 0;
    data[2].year=data[2].month=data[2].day = 0;
	char rizi1[500],rizi2[500];
	cin.getline(rizi1,12);
	//cin.get();
	cin.getline(rizi2,12);
	//cout << rizi[1] << endl;
	//cout << rizi[2] << endl;
    canliang(rizi1,1);
	canliang(rizi2,2);
	nian = abs(data[2].year - data[1].year);
	//cout << "jiange1" << jiange[1]<<" " <<  "jiange2" << jiange[2] << endl;
   //	cout << nian << endl;
	if (nian == 0)
	{
		cout << abs(jiange[2]-jiange[1]) << endl;
	}
	else if (nian == 1)
	{
		cout << (pingrun[leap[1] + 1] - jiange[1] + jiange[2]) << endl;
	}
	else if (nian >= 2)
	{
		for (i = data[1].year + 1; i < data[2].year; i++)
		{
			res = (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0);
			sum += pingrun[res+1];
		}
		sum += jiange[2];
		res = pingrun[leap[1]+1]-jiange[1];
		sum += res;
	    cout << sum << endl;
	}
		return 0;
}
    
int compute(int x, int y,int z) //z=1???z=0??
{//int monthDays[3][13]={{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
	int cd = 0, i = 1;
	if (x == 1)
	{
		return y;
	}
    while (i < x)
	{
		cd += monthDays[1+z][i];
		i++;
	}
	return cd + y;
}
void canliang(char str[],int x)
{
    int len, i = 0;
	len = strlen(str);
	while(str[i]== ' ') {i++;}
	while (isdigit(str[i]))
	{
		data[x].year = data[x].year * 10 + str[i] - '0';
		i++;
	}
	while (str[i]==' ') {i++;}
	while (isdigit(str[i]))
	{
		data[x].month = data[x].month * 10 + str[i] -'0';
		i++;
	}
	while (str[i]==' ') {i++;}
	while((str[i]>= '0') && (str[i] <= '9') && i <len)
	{
		data[x].day = data[x].day * 10 + str[i] - '0';
		i++;
	}
	//cout << data[x].year << ' ' << data[x].month << ' ' << data[x].day << endl;
	leap[x] = ((data[x].year % 4 == 0 && data[x].year % 100 != 0) || (data[x].year % 400 == 0));
	jiange[x] = compute(data[x].month,data[x].day,leap[x]);  //???????????????
//	cout << jiange[x] << endl;
}
void main()
{
	int y1,m1,d1,y2,m2,d2,d=0;
	scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);
	if (m1>=3)
		y1=y1+1;
	if (m2>=3)
		y2=y2+1;
	while(y1<y2)
	{
		if(y1%4==0&&y1%100!=0||y1%400==0) 
		{
			d=d+366;
			y1++;
		}
		else
		{
			d=d+365;
			y1++;
		}
	}
	if (m1==1)
		m1=13;
	if(m1==2)
		m1=14;
	if (m2==1)
		m2=13;
	if(m2==2)
		m2=14;

    while(m1<m2)
	{
		if(m1==3||m1==5||m1==7||m1==8||m1==10||m1==12||m1==13)
		{
			d=d+31;
			m1++;
		}
		if(m1==4||m1==6||m1==9||m1==11)
		{
			d=d+30;
			m1++;
		}
	}
		while(m1>m2)
		{
			if(m2==3||m2==5||m2==7||m2==8||m2==10||m2==12||m2==13)
		{
			d=d-31;
			m2++;
		}
		if(m2==4||m2==6||m2==9||m2==11)
		{
			d=d-30;
			m2++;
		}
	}
			d=d+d2-d1;
			printf("%d",d);
}
int main()
{
	int a,b,c,d,e,f,s;
	int tem;
	int q,w;
	int i;
	scanf("%d %d %d",&a,&b,&c);
	scanf("%d %d %d",&d,&e,&f);
	int days(int x,int y,int z);
	if(a==d)
	{
		q=days(a,b,c);
		w=days(d,e,f);
		s=w-q;
	}
	else
	{
		q=days(a,b,c);
		w=days(d,e,f);
		if((a%4==0&&a%100!=0)||(a%400==0))
		{
		s=366-q;
		for(i=a+1;i<=d-1;i++)
		{
			if((i%4==0&&i%100!=0)||(i%400==0))
				s=s+366;
			else
				s=s+365;
		}
		s=s+w;
		}
	else
		{
		s=365-q;
		for(i=a+1;i<=d-1;i++)
		{
			if((i%4==0&&i%100!=0)||(i%400==0))
				s=s+366;
			else
				s=s+365;
		}
		s=s+w;

		}


	}
	printf("%d",s);

    return 0;
}
int days(int x,int y,int z)
{
	int tem;
	if((x%4==0&&x%100!=0)||(x%400==0))
	{
		if(y==1)
			tem=z;
		else if(y==2)
			tem=31+z;
		else if(y==3)
			tem=31+29+z;
		else if(y==4)
			tem=31+29+31+z;
		else if(y==5)
			tem=31+29+31+30+z;
		else if(y==6)
			tem=31+29+31+30+31+z;
		else if(y==7)
			tem=31+29+31+30+31+30+z;
		else if(y==8)
			tem=31+29+31+30+31+30+31+z;
		else if(y==9)
			tem=31+29+31+30+31+30+31+31+z;
		else if(y==10)
			tem=31+29+31+30+31+30+31+31+30+z;
		else if(y==11)
			tem=31+29+31+30+31+30+31+31+30+31+z;
		else
			tem=31+29+31+30+31+30+31+31+30+31+30+z;
	}
	else
	{
		if(y==1)
			tem=z;
		else if(y==2)
			tem=31+z;
		else if(y==3)
			tem=31+28+z;
		else if(y==4)
			tem=31+28+31+z;
		else if(y==5)
			tem=31+28+31+30+z;
		else if(y==6)
			tem=31+28+31+30+31+z;
		else if(y==7)
			tem=31+28+31+30+31+30+z;
		else if(y==8)
			tem=31+28+31+30+31+30+31+z;
		else if(y==9)
			tem=31+28+31+30+31+30+31+31+z;
		else if(y==10)
			tem=31+28+31+30+31+30+31+31+30+z;
		else if(y==11)
			tem=31+28+31+30+31+30+31+31+30+31+z;
		else
			tem=31+28+31+30+31+30+31+31+30+31+30+z;
	}
	return tem;
}
int main()
{
 int month[5][15];
 
 
 month[1][1]=31;
 month[1][2]=28;
 month[1][3]=31;
 month[1][4]=30;
 month[1][5]=31;
 month[1][6]=30;
 month[1][7]=31;
 month[1][8]=31;
 month[1][9]=30;
 month[1][10]=31;
 month[1][11]=30;
 month[1][12]=31;
 
 month[2][1]=31;
 month[2][2]=29;
 month[2][3]=31;
 month[2][4]=30;
 month[2][5]=31;
 month[2][6]=30;
 month[2][7]=31;
 month[2][8]=31;
 month[2][9]=30;
 month[2][10]=31;
 month[2][11]=30;
 month[2][12]=31;
 int top=0,s=0,a1,b1,c1,a2,b2,c2;
 cin>>a1>>b1>>c1>>a2>>b2>>c2;
if (a1!=a2)
 {
  while (a1<a2-1) 
  {
   if ((a1 % 4 == 0 && a1 % 100 != 0) || (a1 % 400 == 0)){s+=366;}
    else s+=365;
    a1++;
  }
  top=1;
  if ((a1 % 4 == 0 && a1 % 100 != 0) || (a1 % 400 == 0)){top=2;}
  
  if (b1!=12)
   {
   s+=month[top][b1]-c1+1;
   b1++;c1=1;
   }
  while (b1<13){s+=month[top][b1];b1++;}b1=1;c1=1;a1=a2;
 }
 
top=1;if ((a1 % 4 == 0 && a1 % 100 != 0) || (a1 % 400 == 0)){top=2;}
if (b1<b2)
 {
  s+=month[top][b1]-c1+1;b1++;c1=1;
  while (b1<b2){s+=month[top][b1];b1++;}
 }if (a2==2009 && b2!=1)s++;
s+=c2-c1;
cout<<s<<endl;
 return 0;
}
int main()
{
    int y1,m1,d1,y2,m2,d2;
    scanf("%d %d %d",&y1,&m1,&d1);
    scanf("%d %d %d",&y2,&m2,&d2);
    int sum=0;
    int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    if((y1==y2)&&(m1==m2)&&(d1==d2)) printf("0");
    else
    { 
    do
    {
        sum++;
        if((y1%4==0)&&(y1%100!=0)||(y1%400==0))
            month[2]=29;
        if(d1<month[m1])
           d1++;
        else
        {
            d1=1;
            if(m1<12) m1++;
            else
            {
               y1++;
               m1=1;  
            }
        }
        month[2]=28;
    }while(!((y1==y2)&&(m1==m2)&&(d1==d2))); 
    printf("%d",sum);
    }
    getchar();
    getchar();
}
int leapYear(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	return 0;
}
int main()
{
	int month[2][13] = {{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
	int i,startYear,endYear,startMonth,endMonth,startDay,endDay,count = 0;
	scanf("%d%d%d",&startYear,&startMonth,&startDay);
	scanf("%d%d%d",&endYear,&endMonth,&endDay);
	if(startYear < endYear)
	{
		for(i = startMonth + 1; i <= 12; i++)
		{
			count += month[leapYear(startYear)][i];
		}
		for(i = 1; i < endMonth; i++)
		{
			count += month[leapYear(endYear)][i];
		}
		count += month[leapYear(startYear)][startMonth] - startDay;
		count += endDay;
	}else{
		for(i = startMonth + 1; i < endMonth; i++)
		{
			count += month[leapYear(startYear)][i];
		}
		if(startMonth < endMonth)
		{
			count += month[leapYear(startYear)][startMonth] - startDay;
			count += endDay;
		}else{
			count += endDay - startDay;
		}
	}
	for(i = startYear + 1;i < endYear; i++)
	{
		count += 365 + leapYear(i);
	}
	printf("%d",count);
	return 0;
}
void main()
{
	int a,b,c,d,e,f,g,h,j,k,n;
	h=0;
	scanf ("%d %d %d",&a,&b,&c);
	scanf ("%d %d %d",&d,&e,&f);
	for (g=a+1;g<=d;g++)
	{
		if(g%400==0||(g%4==0&&g%100!=0))
		{
			h+=1;
		}
	}
	int days[12]={0,31,59,90,120,151,181,212,243,273,304,334};
	j=days[b-1];
    k=days[e-1];
	n=365*(d-a);
	if(a%400==0||(a%4==0&&a%100!=0)&&(b==1||b==2))
		h+=1;
	if(d%400==0||(d%4==0&&d%100!=0)&&(e==1||e==2))
		h-=1;
	n=n+h-j+k-c+f;
	printf("%d\n",n);
}
void main()
{
	int y1,y2,m1,m2,d1,d2;
	int sum1,sum2,x1,x2,final;
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
	{ switch(m1)
	{
	            case 1:x1=d1;break;
				case 2:x1=31+d1;break;
				case 3:x1=31+29+d1;break;
				case 4:x1=31+29+31+d1;break;
				case 5:x1=31+29+31+30+d1;break;
				case 6:x1=31+29+31+30+31+d1;break;
				case 7:x1=31+29+31+30+31+30+d1;break;
			    case 8:x1=31+29+31+30+31+30+31+d1;break;
				case 9:x1=31+29+31+30+31+30+31+31+d1;break;
				case 10:x1=31+29+31+30+31+30+31+31+30+d1;break;
				case 11:x1=31+29+31+30+31+30+31+31+30+31+d1;break;
				case 12:x1=31+29+31+30+31+30+31+31+30+31+30+d1;break;
	}
		sum1=365*(y1-1)+x1+(y1-1)/4-y1/100+y1/400; 
	}
	else
	{
         switch(m1)
	{
	            case 1:x1=d1;break;
				case 2:x1=31+d1;break;
				case 3:x1=31+28+d1;break;
				case 4:x1=31+28+31+d1;break;
				case 5:x1=31+28+31+30+d1;break;
				case 6:x1=31+28+31+30+31+d1;break;
				case 7:x1=31+28+31+30+31+30+d1;break;
			    case 8:x1=31+28+31+30+31+30+31+d1;break;
				case 9:x1=31+28+31+30+31+30+31+31+d1;break;
				case 10:x1=31+28+31+30+31+30+31+31+30+d1;break;
				case 11:x1=31+28+31+30+31+30+31+31+30+31+d1;break;
				case 12:x1=31+28+31+30+31+30+31+31+30+31+30+d1;break;
	}
		 sum1=365*(y1-1)+x1+y1/4-y1/100+y1/400;
	}
	if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
	{
       switch(m2)
	{
	            case 1:x2=d2;break;
				case 2:x2=31+d2;break;
				case 3:x2=31+29+d2;break;
				case 4:x2=31+29+31+d2;break;
				case 5:x2=31+29+31+30+d2;break;
				case 6:x2=31+29+31+30+31+d2;break;
				case 7:x2=31+29+31+30+31+30+d2;break;
			    case 8:x2=31+29+31+30+31+30+31+d2;break;
				case 9:x2=31+29+31+30+31+30+31+31+d2;break;
				case 10:x2=31+29+31+30+31+30+31+31+30+d2;break;
				case 11:x2=31+29+31+30+31+30+31+31+30+31+d2;break;
				case 12:x2=31+29+31+30+31+30+31+31+30+31+30+d2;break;
	}
		sum2=365*(y2-1)+x2+(y2-1)/4-y2/100+y2/400;
	}
	else
	{
         switch(m2)
	{
	            case 1:x2=d2;break;
				case 2:x2=31+d2;break;
				case 3:x2=31+28+d2;break;
				case 4:x2=31+28+31+d2;break;
				case 5:x2=31+28+31+30+d2;break;
				case 6:x2=31+28+31+30+31+d2;break;
				case 7:x2=31+28+31+30+31+30+d2;break;
			    case 8:x2=31+28+31+30+31+30+31+d2;break;
				case 9:x2=31+28+31+30+31+30+31+31+d2;break;
				case 10:x2=31+28+31+30+31+30+31+31+30+d2;break;
				case 11:x2=31+28+31+30+31+30+31+31+30+31+d2;break;
				case 12:x2=31+28+31+30+31+30+31+31+30+31+30+d2;break;
	}
		 sum2=365*(y2-1)+x2+y2/4-y2/100+y2/400;
	}
     final=sum2-sum1;
	 printf("%d\n",final);
}
int func(int,int,int);
int main()
{
 int startYear,startMonth,startDay,endYear,endMonth,endDay;
 cin>>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;
 cout<<func(endYear,endMonth,endDay)-func(startYear,startMonth,startDay);
 return 0;
}
int func(int year,int month,int day)
{
 int sum=0,i,mping[12]={31,28,31,30,31,30,31,31,30,31,30,31},mrun[12]={31,29,31,30,31,30,31,31,30,31,30,31};
 for(i=1;i<year;i++)
  if((i%4==0&&i%100!=0)||(i%400==0))
   sum+=366;
  else
   sum+=365;
 if((year%4==0&&year%100!=0)||(year%400==0))
  for(i=0;i<month-1;i++)
   sum+=mrun[i];
 else
  for(i=0;i<month-1;i++)
   sum+=mping[i];
 sum+=day;
 return sum;
}
int main()
{
	int y,m,d;
	int c,h,l;
	scanf("%d%d%d%d%d%d",&y,&m,&d,&c,&h,&l);
	int day=0;
	int a[13];
	a[1]=31;
	a[3]=31;
	a[5]=31;
	a[7]=31;
	a[8]=31;
	a[10]=31;
	a[12]=31;
	a[2]=29;
	a[4]=30;
	a[6]=30;
	a[9]=30;
	a[11]=30;
	int b[13];
	b[1]=31;
	b[3]=31;
	b[5]=31;
	b[7]=31;
	b[8]=31;
	b[10]=31;
	b[12]=31;
	b[2]=28;
	b[4]=30;
	b[6]=30;
	b[9]=30;
	b[11]=30;
	int i,j;
	for(i=y;i<=c;i++)
	{
		if(i==y)
		{	j=m;}
		else
		{j=1;}
		for(j;j<=12;j++)
		{
			if(i==c && j==h)
			{break;}
			if((i%4==0&&i%100!=0)||(i%400==0))
			{day+=a[j];}
			else
			{day+=b[j];	}
		}
	}
	day=day-d+l;
	printf("%d",day);
	return 0;
}
int main() 
{
	int startYear,startMonth,startDay,endYear,endMonth,endDay;                           //??????????? 
	scanf("%d%d%d%d%d%d",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);   //??????????? 
	int sum=0,sumYear=0,sumMonth=0,sumDay=0;                                             //???????????????? 
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};                                     //????12?????
	int b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};                                     //????12?????
	int i;
    //?????????? 
	{
	    if(startDay<endDay)
	        {
			    for(i=startDay;i<endDay;i++) sumDay+=1;
	        }
	    else if(startDay>endDay)
	        {
			    for(i=startDay;i>endDay;i--) sumDay-=1;
		    }
    }
    //?????????? 
	{
		if(startMonth<endMonth)
		    {
				if((endYear%4==0&&endYear%100!=0)||(endYear%400==0))    
				    {
						for(i=startMonth;i<endMonth;i++) sumMonth+=b[i];                //?????????????? 
					}
				else 
				    for(i=startMonth;i<endMonth;i++) sumMonth+=a[i];
			}
		else if(startMonth>endMonth)
		    {
				if((endYear%4==0&&endYear%100!=0)||(endYear%400==0)) 
				    {
						for(i=startMonth;i>endMonth;i--) sumMonth-=b[i];
					}
				else 
				    for(i=startMonth;i>endMonth;i--) sumMonth-=a[i];
			}
	} 
	//??????????
	{
		if(startYear<endYear)
		   {
				for(i=startYear;i<endYear;i++) 
				{
					if((i%4==0&&i%100!=0)||(i%400==0)) sumYear+=366;
					else sumYear+=365;
				}
		   }
	}
	sum=sumDay+sumMonth+sumYear;
	printf("%d",sum);
	return 0;
}
int main()
{
    int month1[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}, month2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int startYear, startMonth, startDay;
    int endYear, endMonth, endDay;
    int deltaDay = 0, i = 0;
    int day1 = 0, day2 = 0, day = 0;

    cin >> startYear >> startMonth >> startDay;
    cin >> endYear >> endMonth >> endDay;


    for(i = startYear; i < endYear; i++)
    {
        if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))
        day = day + 366;
        else
        day = day + 365;
    }


    i = startYear;
    if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))
    {
        for(int j = 1; j < startMonth; j++)
        {
            day1 = day1 + month2[j];
        }
    }
    else
    {
        for(int j = 1; j < startMonth; j++)
        {
            day1 = day1 + month1[j];
        }
    }
    day1 = day1 + startDay;

    i = endYear;
    if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))
    {
        for(int j = 1; j < endMonth; j++)
        {
            day2 = day2 + month2[j];
        }
    }
    else
    {
        for(int j = 1; j < endMonth; j++)
        {
            day2 = day2 + month1[j];
        }
    }
    day2 = day2 + endDay;


    deltaDay = day2 - day1 + day;

    cout << deltaDay;


    return 0;
}
int main()
{
  int sy,sm,sd,ey,em,ed,m[12],i,d1,d2,d3,d4,d;
  m[1]=m[3]=m[5]=m[7]=m[8]=m[10]=m[12]=31;
  m[4]=m[6]=m[9]=m[11]=30;
  m[2]=28;
  scanf("%d %d %d %d %d %d",&sy,&sm,&sd,&ey,&em,&ed);
  d1=d2=d4=0;
  for(i=1;i<sm;i++)
    d1=d1+m[i];
  for(i=1;i<em;i++)
    d2=d2+m[i];
  d3=((ey-sy)*365)+(d2+ed-d1-sd);
  for(i=sy;i<=ey;i++)
    if((i%4==0&&i%100!=0)||(i%400==0))
      d4=d4+1;
  if(((sy%4==0&&sy%100!=0)||(sy%400==0))&&(sm>2||sm==2&&sd==29))
    d4=d4-1;
  if(((ey%4==0&&ey%100!=0)||(ey%400==0))&&em<3)
    d4=d4-1;
  d=d3+d4;
  printf("%d",d);

    
}
//********************************
//*???3.cpp   **
//*?????? 1200012768 **
//*???2013.1.3  **
//*??????????????  **
//********************************
int ydays[2] = {365, 366};
int mdays[2] = {28, 29};
int y1, m1, d1, y2, m2, d2;
int leap(int y)
{
	if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)
		return 1;
	return 0;
}
int cal_num(int y, int m, int d)
{
	int num = 0;
	for (int i = 1; i < m; i++)
		switch(i)
		{	
			case 1: num += 31; break;
			case 2: {int is_leap = leap(y); num += mdays[is_leap]; break;}
			case 3: num += 31; break;
			case 4: num += 30; break;
			case 5: num += 31; break;
			case 6: num += 30; break;
			case 7: num += 31; break;
			case 8: num += 31; break;
			case 9: num += 30; break;
			case 10: num += 31; break;
			case 11: num += 30; break;
			default:;
		}
	return num + d;
}
int cal_days()
{
	if (y1 == y2)
		return cal_num(y2, m2, d2) - cal_num(y1, m1, d1);
	int is_leap = leap(y1);
	int days = ydays[is_leap] - cal_num(y1, m1, d1);
	for (int i = y1 + 1; i < y2; i++)
		is_leap = leap(i), days += ydays[is_leap];
	days += cal_num(y2, m2, d2);
	return days;
}
int main()
{
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
	cout << cal_days();
	return 0;
}
int main()
{
	int a,b,c,d,e,f,m,n,i,h;
	int day1,day2,day3,day;
	scanf("%d %d %d\n%d %d %d",&a,&b,&c,&d,&e,&f);
	if((a%4==0&&a%100!=0)||(a%400==0))
		m=1;
	else
		m=2;
	if((d%4==0&&d%100!=0)||(d%400==0))
		n=1;
	else
		n=2;
	for(i=a,h=0;i<=d;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			h=h+1;
		else
			;
	}
	if(m==2&&n==2)
		day1=(d-a-h)*365+h*366;
	if(m==1&&n==2)
	{if((b==2&&c==29)||b>2)
			day1=(d-a-h+1)*365+(h-1)*366;
		else
            day1=(d-a-h)*365+h*366;
	}
	if(m==2&&n==1)
	{
		if((e==2&&f==29)||e>2)
            day1=(d-a-h)*365+h*366;
		else
            day1=(d-a-h+1)*365+(h-1)*366;
	}
	if(m==1&&n==1)
	{
		if(((b==2&&c<29)||b==1)&&((e==2&&f==29)||e>2))
			day1=(d-a-h)*365+h*366;
		else
			if(((b==2&&c==29)||b>2)&&((e==2&&c<29)||e==1))
				day1=(d-a+2)*366+(h-2)*365;
			else
				day1=(d-a-h+1)*365+(h-1)*366;
	}
	if(b<e)
	{m=b;n=e;}
	else
		if(b>e)
		{m=e;n=b;}
		else
			m=n=a;
    for(day2=0;m<=n-1;m++)
		switch(m)
		{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:day2=day2+31;break;
		case 4:
		case 6:
		case 9:
		case 11:day2=day2+30;break;
		case 2:day2=day2+28;break;
		}
	if(b>e)
		day2=-day2;
	day3=f-c;
	day=day1+day2+day3;
	printf("%d\n",day);
	return 0;
}
int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int rdays[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int ryear(int year)
{
	return year%4==0&&year%100!=0||year%400==0;
}
int sum1(int year,int month, int day)
{
	int i,restday=day;
	for(i=1;i<month;i++) 
	{
		if(ryear(year)) restday=restday+rdays[i];
		else restday=restday+days[i];
	}
	return restday;
}
int main()
{
	int sy,sm,sd,ey,em,ed;
	scanf("%d%d%d %d%d%d",&sy,&sm,&sd,&ey,&em,&ed);
	int i,sum=0;
	for(i=sy+1;i<ey;i++)
	{  if(ryear(i)==1) sum+=366;
	   else sum+=365;
	   }
	int start=sum1(sy,sm,sd);
	int end=sum1(ey,em,ed);
	if(sy==ey) sum=sum+end-start;
	else 
	{
		sum=sum+end+365-start;
	    if(ryear(sy)) sum++;
	}
	printf("%d",sum);
}
int main()
{
	int ans = 0, anstemp1=0, anstemp2 = 0, i;
	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 x1, y1, z1, x2, y2, z2;
    cin >> x1>>y1>> z1>>x2>> y2>>z2;
	for (int x = x1; x <= x2 - 1; x++)
	{
		if ((x % 4 == 0 && x % 100 != 0) || (x % 400 == 0))
		{
			ans += 366;
		}
		else
		{
			ans += 365;
		}
	}
	if ((x1 % 4 == 0 && x1 % 100 != 0) || (x1 % 400 == 0))
	{
		
		
	for ( i = 1; i <= y1 - 1; i++)
	{
		anstemp1 += b[i];
	}
	anstemp1 += z1;
	}
	else
	{
		for (i = 1; i <= y1 - 1; i++)
		{
		anstemp1 += a[i];
		}
		anstemp1 += z1;
	}


	
	if ((x2 % 4 == 0 && x2 % 100 != 0) || (x2 % 400 == 0))
	{
		
		
	for (i = 1; i <= y2 - 1; i++)
	{
		anstemp2 += b[i];
	}
	anstemp2 += z2;
	}
	else
	{
		for (i = 1; i <= y2 - 1; i++)
		{
		anstemp2 += a[i];
		}
		anstemp2 += z2;
	}


	cout << ans - anstemp1 + anstemp2;

	return 0;
}
int main()
{
	int answer=0,startYear,startMonth,startDay,endYear,endMonth,endDay;
	cin>>startYear>>startMonth>>startDay;
	cin>>endYear>>endMonth>>endDay;
	int d[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int gap;
	gap=endYear-startYear;
	int judge1,judge2,mid;
	judge1=((endYear%400==0)||(endYear%4==0&&endYear%100!=0));
	judge2=((startYear%400==0)||(startYear%4==0&&startYear%100!=0));
        if(startYear==endYear&&startMonth==endMonth&&startDay==endDay)
          {cout<<"0";
           return 0;}
	if(startMonth>endMonth)
		{
			mid=0;
			for(int i=endMonth-1;i<startMonth-1;i++)
			{mid+=d[i];}
		       mid+=(startDay-endDay);
		answer-=mid;
		}
		else
		{
			mid=0;
			for(int i=startMonth-1;i<endMonth-1;i++)
				mid+=d[i];
			mid+=(endDay-startDay);
			answer+=mid;
		}
		   answer+=365*gap;
			for(int k=startYear+1;k<endYear;k++)
				answer+=(k%400==0||(k%4==0&&k%100!=0));
	        if((startMonth<2&&judge2==1)||((startMonth==2&&startDay!=29)&&judge2==1))
				answer++;
			  if(endMonth>2&&judge1==1)
				answer++;
			cout<<answer;
			return 0;
}
int main()
{
	int a1,b1,c1,a2,b2,c2,i,sum=0,s=0,f=0,t=0;
	cin >>a1>>b1>>c1>>a2>>b2>>c2;
	for(i = a1;i <a2;i++)
	{
		if((i % 4 == 0 &&i % 100 != 0) || (i % 400 == 0))
			sum+=366;
		else
			sum+=365;
	}

	if(b1 > b2)
	{
		f = 1;
		t=b1;b1=b2;b2=t;
	}
	for(i = b1;i < b2;i++)
	{
		if(i==2)
		{
			if((a2 % 4 == 0 && a2 % 100 != 0) || (a2 % 400 == 0)) 
				s+=29;
			else
				s+=28;
		}
		else if(i==1||i==3||i==5||i==7||i==8||i==10)
			s += 31;
		else
			s+=30;
	}
	if(f==1)
		sum-=s;
	else
		sum+=s;
	sum=sum+(c2-c1);
	cout <<sum<<endl;
	return 0;
}
int main ()
{
	int y1 , m1 , d1 , y2 , m2 , d2 ;
	int i , j , sum = 0 ;
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 ;
	for ( i = y1 ; i < y2 ; i ++ )
	{
		if ( ( i % 4 == 0 && i % 100 != 0 )||( i % 400 == 0 ) )
		{
			sum += 366;
		}
		else 
		sum += 365 ;
	}
	for ( i = 1 ; i < m1 ; i ++ )
	{
		if ( i == 4 || i == 6 || i == 9 || i == 11 )
		{
			sum = sum - 30 ;
		}
		if ( i == 2 )
		{
			if(( y2 % 4 == 0 && y2 % 100 != 0 )||( y2 % 400 == 0 ) )
			{
				sum = sum - 29 ;
			}
			else
			sum = sum - 28 ;
		}
		if ( i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 )
		{
			sum = sum - 31 ;
		}
	}
	sum = sum - d1 ;
	for ( i = 1 ; i < m2 ; i ++ )
	{
		if ( i == 4 || i == 6 || i == 9 || i == 11 )
		{
			sum = sum + 30 ;
		}
		if ( i == 2 )
		{
			if(( y2 % 4 == 0 && y2 % 100 != 0 )||( y2 % 400 == 0 ) )
			{
				sum = sum + 29 ;
			}
			else
			sum = sum + 28 ;
		}
		if ( i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 )
		{
			sum = sum + 31 ;
		}
	}
	sum = sum + d2 ;
	cout << sum << endl ;
	return 0 ;
}