semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int year=0,month1=0,month2=0,day;
	int y1,y2,m1,m2,d1,d2;
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	int i;
	for(i=y1;i<=y2;i++)
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			year++;
	year+=365*(y2-y1);
	
	if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
		a[2]=29;
	for(i=1;i<=m1-1;i++)
		month1=month1+a[i];
	month1+=d1;

	if(!(y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
		a[2]=28;
	for(i=1;i<=m2-1;i++)
		month2=month2+a[i];
	month2+=d2;
	day=year+month2-month1;
	cout<<day;


	return 0;
}
int m1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int m2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main(){
	int year[2],month[2],day[2],i,j;
	for(i=0;i<2;i++){
		cin>>year[i]>>month[i]>>day[i];
	}
	for(i=0;i<2;i++){
		for(j=1;j<month[i];j++){
			if(year[i]%4!=0||(year[i]%100==0&&year[i]%400!=0)){
				day[i]+=m1[j];
			}
			else day[i]+=m2[j];
		}
	}
	for(i=year[1];i>year[0];i--){
		if((i-1)%4!=0||((i-1)%100==0&&(i-1)%400!=0))
			day[1]+=365;
		else
			day[1]+=366;
	}
	cout<<day[1]-day[0]<<endl;
	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2013-1-13
 *      Author: Administrator
 */
int main()
{
	int yday[2] = {365, 366};
	int leap = 0, day1 = 0, day2 = 0, i;
	int mday[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 y1, m1, d1, y2, m2, d2;
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
	leap = (y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0);
	for(i = 1; i < m1; i++)
	{
		day1 += mday[leap][i];
	}
	day1 += d1;
	for(i = y1; i < y2; i++)
	{
		leap = (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0);
		day2 += yday[leap];
	}
	leap = (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0);
	for(i = 1; i < m2; i++)
	{
		day2 += mday[leap][i];
	}
	day2 += d2;
	day2 = day2 - day1;
	cout << day2 << endl;

}
//**********************************
//*??  ???????????*****
//*????? 1300012753     ******* 
//*???2013.11.02          ******* 
//**********************************
int main()
{
	int syear, smonth, sday, eyear, emonth, eday;
	cin >> syear >> smonth >> sday >> eyear >> emonth >> eday; 
	int sum = 0;
	int month1[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	int month2[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	if((syear % 4 == 0 && syear % 100 != 0) || (syear % 400 == 0))
	month1[2] = 29;
	if((eyear % 4 == 0 && eyear % 100 != 0) || (eyear % 400 == 0))
	month2[2] = 29;
	if (syear == eyear && smonth == emonth)
	{
		sum += eday - sday;
	}
	else if(syear == eyear && smonth != emonth)
	{
		sum += month1[smonth] - sday + 1;
		for(int month = smonth + 1; month < emonth; month++)
		sum += month1[month];
		sum += eday - 1;
	}
	else
	{
		sum += month1[smonth] - sday + 1;
	    for(int month = smonth + 1; month <= 12; month++)
	    {
		    sum += month1[month];
	    }
	    for (int year = syear + 1; year < eyear; year++)
	    {
		    if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		    sum += 366;
		    else
		    sum += 365;
	    }
	    for(int month = 1; month < emonth; month++)
	    {
		    sum += month2[month];
	    }
	    sum += eday - 1;
	}
	cout << sum;
	return 0;
}
/*
 * 5.cpp
 *
 *  Created on: 2011-11-4
 *      Author: 11294
 */
int main(){
	int y1,m1,d1;
	int y2,m2,d2;
	cin>>y1>>m1>>d1>>y2>>m2>>d2;
	int i,j;
	int s;
	if(y1<y2){s=365*(y2-y1-1);
	for(i=y1+1;i<y2;i++){
		if((i%4==0&&i%100!=0)||(i%400==0)){
			s++;
		}
	}
	}
	else{s=0;}
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if(y1==y2){
		for(j=m1;j<m2;j++){
			s=s+a[j];
		}
		if((y1%4==0&&y1%100!=0)||(y1%400==0)){
			if(m1<=2&&m2>2)s++;
		}
		s=s+d2-d1;
	}
	else{
		int left1;
		int passed2;
		left1=365;
		for(j=1;j<m1;j++){
			left1=left1-a[j];
		}
		left1=left1-d1;
		if((y1%4==0&&y1%100!=0)||(y1%400==0)){
			if(m1<=2)left1++;
		}
		passed2=0;
		for(j=1;j<m2;j++){
			passed2=passed2+a[j];
		}
		passed2=passed2+d2;
		if((y2%4==0&&y2%100!=0)||(y2%400==0)){
			if(2<m2)passed2++;
		}
		s=s+left1+passed2;
	}
	cout<<s<<endl;
	return 0;
}
void f1(int y1,int m1,int d1,int y2,int m2,int d2);
void main()
{
	int ya,yb,ma,mb,da,db;
	scanf("%d%d%d%d%d%d",&ya,&ma,&da,&yb,&mb,&db);
	f1(ya,ma,da,yb,mb,db);
}
void f1(int y1,int m1,int d1,int y2,int m2,int d2)
{
	int a,i,j=0;
	long x1,x2;
	for (i=1;i<y1;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			j++;
		}
		
	}
	x1=(y1-1)*365+j;
	j=0;
	for (i=1;i<y2;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			j++;
		}
		
	}
	x2=(y2-1)*365+j;
	

	int t;
	if((y1%4==0&&y1%100!=0)||(y1%400==0))
	{
		switch (m1)
		{
		case 1 :m1=1;break;
		case 2 :m1=32;break;
		case 3 :m1=61;break;
		case 4 :m1=92;break;
		case 5 :m1=122;break;
		case 6 :m1=153;break;
		case 7 :m1=183;break;
		case 8 :m1=214;break;
		case 9 :m1=245;break;
		case 10 :m1=275;break;
		case 11 :m1=306;break;
		case 12 :m1=336;break;
		}
		
	}
	else 
	{
		switch (m1)
		{
		case 1 :m1=1;break;
		case 2 :m1=32;break;
		case 3 :m1=60;break;
		case 4 :m1=91;break;
		case 5 :m1=121;break;
		case 6 :m1=152;break;
		case 7 :m1=182;break;
		case 8 :m1=213;break;
		case 9 :m1=244;break;
		case 10 :m1=274;break;
		case 11 :m1=305;break;
		case 12 :m1=335;break;
		}
		
	}
	x1=x1+m1+d1-1;
	if((y2%4==0&&y2%100!=0)||(y2%400==0))
	{
		switch (m2)
		{
		case 1 :m2=1;break;
		case 2 :m2=32;break;
		case 3 :m2=61;break;
		case 4 :m2=92;break;
		case 5 :m2=122;break;
		case 6 :m2=153;break;
		case 7 :m2=183;break;
		case 8 :m2=214;break;
		case 9 :m2=245;break;
		case 10 :m2=275;break;
		case 11 :m2=306;break;
		case 12 :m2=336;break;
		}
		
	}
	else 
	{
		switch (m2)
		{
		case 1 :m2=1;break;
		case 2 :m2=32;break;
		case 3 :m2=60;break;
		case 4 :m2=91;break;
		case 5 :m2=121;break;
		case 6 :m2=152;break;
		case 7 :m2=182;break;
		case 8 :m2=213;break;
		case 9 :m2=244;break;
		case 10 :m2=274;break;
		case 11 :m2=305;break;
		case 12 :m2=335;break;
		}
		
	}
	x2=x2+m2+d2-1;
	if(x1<x2)
	{
		t=x1;
		x1=x2;
		x2=t;
	}
	j=x1-x2;
	printf("%d",j);
}
void main()
{
	int sy,sm,sd,ey,em,ed,d[12]={31,28,31,30,31,30,31,31,30,31,30,31},i,m,n=0;
	scanf("%d %d %d",&sy,&sm,&sd);
	scanf("%d %d %d",&ey,&em,&ed);
	
	for (i=sy;i<=ey;i++)
	{
		if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)) d[1]=29;
		else d[1]=28;
		if (sy!=ey)
		{
	    	if (i==sy) 
			{
	    		for (m=sm;m<=12;m++)
				{
	    			if (m==sm) n=n+d[m-1]-sd;
	    			else n=n+d[m-1];
				}
			}
	    	else if (i==ey) 
			{
		    	for (m=1;m<=em;m++)
				{
		    		if (m==em) n=n+ed;
		    		else n=n+d[m-1];
				}
			}
	    	else 
			{
		    	if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)) n=n+366;
	    		else n=n+365;
			}
		}
		else if (sy==ey)
		{
			if (sm==em) n=ed-sd;
			else if (sm!=em) 
				for (m=sm;m<=em;m++)
				{
					if (m==sm) n=n+d[m-1]-sd;
					else if (m==em) n=n+ed;
					else n=n+d[m-1];
				}
		}
	}
	printf("%d\n",n);
}
int main()
{
    int i, j;
    int count1 = 0, count2 = 0;
    int year1, month1, day1, year2, month2, day2;
    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}};
    cin >> year1 >> month1 >> day1 >> year2 >> month2 >> day2;
    int leap1 = year1 % 400 == 0 || ((year1 % 4 == 0) && (year1 % 100 != 0));
    int leap2 = year2 % 400 == 0 || ((year2 % 4 == 0) && (year2 % 100 != 0));
    for (i = 1; i < month1; i++)
    {
         count1 += month[leap1][i];
    }
    count1 += day1 - 1;
    for (i = year1; i < year2; i++)
    {
        if (i % 400 == 0 || ((i % 4 == 0) && (i % 100 != 0)))
        {
            count2 += 366;
        }
        else
        {
            count2 += 365;
        }
    }
    for (i = 1; i < month2; i++)
    {
        count2 += month[leap2][i];
    }
    count2 += day2 - 1;
    cout << count2 - count1 << endl;
    return 0;
}
int main()
{
    int a,b,c,k=0,i,w,q,T;
    int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int d,e,f,t,h=0,g=0;
    scanf("%d%d%d",&a,&b,&c);
    scanf("%d%d%d",&d,&e,&f);
    for(i=a;i<=d;i++)
    {
     if(i%4==0&&i%100!=0||i%400==0)
     k=k+1;
    }
    t=(d-a-1)*365;
    for(w=b;w<=12;w++)
    {
      h=h+m[w];
      }
    for(q=e;q>=1;q--)
    {
     g=g+m[q-1];
     }
     T=t+k+h+g-c+f;
     printf("%d",T);
     return 0;
}
/*
 *
 * ????
 * ???2011-01-09
 * ?????? 1000012774
 * ???
 */

int judge(int year)
{
	int i,j,t;
	if(year%4!=0)
		return 0;
	else
	{
		if(year%100==0){
			if(year%400==0)
				return 1;
			else
				return 0;
		}
		else
			return 1;
	}
}

int main()
{
	int y1,y2,m1,m2,d1,d2,day=0,temp;
	int a[14];
	int i,j,k;
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	a[1]=31;
	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;
	if((y2-y1)>1){
		for(i=y1+1;i<y2;i++)
		{
			if(judge(i))
				day=day+366;
			else
				day=day+365;
		}
	}
	if((y2-y1)!=0){
	if(judge(y1)){
		a[2]=29;
		if(m1!=12){
		for(i=m1+1;i<=12;i++)
			day=day+a[i];
		}
		day=day+a[m1]-d1;
	}
	a[2]=28;
	if(judge(y1)==0)
	{
		if(m1!=12){
			for(i=m1+1;i<=12;i++)
			day=day+a[i];
				}
		day=day+a[m1]-d1;
	}
	if(judge(y2)!=0){
		a[2]=29;
		temp=0;
				if(m2!=1){
				for(i=1;i<m2;i++)
					day=day+a[i];
				day=day+d2;
				}
				else
					day=day+d2;
	}
	a[2]=28;
	if(judge(y2)==0){
					if(m2!=1){
					for(i=1;i<m2;i++)
						day=day+a[i];
					day=day+d2;
					}
					else
						day=day+d2;
		}
	}
	a[2]=28;
	if(y2-y1==0){
		if(judge(y1)==0){
			if((m2-m1)!=0){
				for(i=m1+1;i<m2;i++)
					day=day+a[i];
			day=day+a[m1]-d1+d2;
			}
			else
				day=d2-d1;
		}
		if(judge(y1)!=0){
			a[2]=29;
					if((m2-m1)!=0){
						for(i=m1+1;i<m2;i++)
							day=day+a[i];
					day=day+a[m1]-d1+d2;
				}
					else
						day=d2-d1;
		}
	}
	cout<<day;
	return 0;
}
int main()
{
 int startYear,startMonth,stratDay,endYear,endMonth,endDay,i,sum=0,num1=0,num2=0,total;
 int g[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},s[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
  cin>>startYear>>startMonth>>stratDay;
  cin>>endYear>>endMonth>>endDay;
  for(i=startYear;i<endYear;i++)
  {
	  if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
		  sum=sum+366;
	  else
		  sum=sum+365;
  }
  for(i=0;i<startMonth;i++)
  {
	  if((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0))
		  num1=num1+s[i];
	  else
		  num1=num1+g[i];
	
  }
  num1=num1+stratDay;
  for(i=0;i<endMonth;i++)
  {
       if((endYear % 4 == 0 && endYear % 100 != 0) || (endYear % 400 == 0))
		  num2=num2+s[i];
	   else
		   num2=num2+g[i];
	
  }
  num2=num2+endDay;
  total=sum-num1+num2;
  cout<<total<<endl;
  return 0;
}
int main()
{
    int mon[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 days=0;
    int y1,m1,d1,y2,m2,d2;
    cin>>y1>>m1>>d1>>y2>>m2>>d2;
    for(int i=y1;i<y2;i++)
    {
        int day;
        int flag1=((i% 4 == 0 && i % 100 != 0) || (i % 400 == 0))&&m1<=2;
        int flag2=(((i+1)% 4 == 0 && (i+1) % 100 != 0) || ((i+1) % 400 == 0))&&m1>2;
        if(flag1||flag2)
            day=366;
        else day=365;
        days+=day;
    }
    if(m1<m2)
    {
        for(int i=m1;i<m2;i++)
        {
            int flag=(y2% 4 == 0 && y2% 100 != 0) || (y2 % 400 == 0);
            days+=mon[flag][i];
        }
    }
    else if(m1>m2)
    {
        for(int i=m2;i<m1;i++)
        {
            int flag=(y2% 4 == 0 && y2% 100 != 0) || (y2 % 400 == 0);
            days-=mon[flag][i];
        }
    }
    days+=d2-d1;
    cout<<days;
    return 0;
}
int main()
{
	int y1,y2,m1,m2,d1,d2,d=0,m=0,i;
	scanf("%d %d %d\n%d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	if(y1==y2)
	{
		if(m1==m2)
		d=d2-d1;
		else
		{
		for(i=m1;i<m2;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10)
			d+=31;
			else
			if(i==4||i==6||i==9||i==11)
			d+=30;
			else
			if(((y1%4==0&&y1%100!=0)||y1%400==0)&&i==2)
			d+=29;
			else
			d+=28;
		}
		d+=d2-d1;
	    }
	}
	else
	{
		for(i=m1;i<m2+12;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12||i==13||i==15||i==17||i==19||i==20||i==22)
			d+=31;
			else
			if(i==4||i==6||i==9||i==11||i==16||i==18||i==21||i==23)
			d+=30;
			else
			if(((y1%4==0&&y1%100!=0)||y1%400==0)&&(i==2||i==14))
			d+=29;
			else
			d+=28;
		}
		d+=d2-d1;
		if(y2-y1>=2)
		{
			for(i=y1;i<y2-1;i++)
			{
				if((i%4==0 && i%100!=0)||i%400==0)
				d+=366;
				else
				d+=365;
			}
	}
	}
	if(d>366)
	d++;
	printf("%d",d);
	return 0;
}
int main()
{
	int i ,j ,k, ay, am, ad, by, bm, bd, day = 0;
	int moutha[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int mouthb[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
	cin >> ay >> am >> ad;
	cin >> by >> bm >> bd;
	for(i = ay ; i < by; i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
		{
			day+=366;
		}
		else
		{
			day+=365;
		}
	}
	for(i = 0; i < bm - 1;i++)
	{
		if((by % 4 == 0 && by % 100 != 0) || (by % 400 == 0))
		{
			day += mouthb[i];
		}
		else
		{
			day += moutha[i];
		}
	}
	day+=bd;
	for(i = 0; i < am - 1; i++)
	{
		if((ay % 4 == 0 && ay % 100 != 0) || (ay % 400 == 0))
		{
			day -= mouthb[i];
		}
		else
		{
			day -= moutha[i];
		}
	}
	day-=ad;
	cout << day << endl;
	return 0;
}
int run_check(int year)
{
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	return 0;
}

int days_in_months[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int main()
{
    int sy, sm, sd, ey, em, ed, ans = 0;

	cin >> sy >> sm >> sd >> ey >> em >> ed;

	for (int i = sy + 1; i < ey; i++)
		ans += run_check(i) + 365;

	if (sy != ey) {
		for (int i = sm + 1; i <= 12; i++) {
			ans += days_in_months[i];
			if (i == 2)
				ans += run_check(sy);
		}
		for (int i = 1; i < em; i++) {
			ans += days_in_months[i];
			if (i == 2)
				ans += run_check(ey);
		}
	}
	else {
		for (int i = sm + 1; i < em; i++) {
			ans += days_in_months[i];
			if (i == 2)
				ans += run_check(sy);
		}
	}

	if (sy != ey || sm != em) {
		for (int i = sd; i <= days_in_months[sm]; i++)
			ans++;
		if (sm == 2)
			ans += run_check(sy);
		for (int i = 1; i < ed; i++)
			ans++;
	}
	else {
		for (int i = sd; i < ed; i++)
			ans++;
	}
	cout << ans;
    return 0;
}
int main() {
    int year1,month1,day1;
    int year2,month2,day2;
    int i, temp;
    long int n=0;
    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};
    scanf("%d%d%d", &year1, &month1, &day1);
    scanf("%d%d%d", &year2, &month2, &day2);
    temp=year1;
    while (temp!=year2) {
        if ((temp%4==0&&temp%100!=0)||(temp%400==0)) {
            n=n+366;
        } else {
            n=n+365;
        }
        temp+=1;
    }
    temp=0;
    if ((year1%4==0&&year1%100!=0)||(year1%400==0)) {
        for(i=0;i<month1-1;i++) {
            temp=temp+B[i];
        }
        temp=temp+day1;
    } else {
        for(i=0;i<month1-1;i++) {
            temp=temp+A[i];
        }
        temp=temp+day1;
    }
    n=n-temp;
    temp=0;
    if ((year2%4==0&&year2%100!=0)||(year2%400==0)) {
        for(i=0;i<month2-1;i++) {
            temp=temp+B[i];
        }
        temp=temp+day2;
    } else {
        for(i=0;i<month2-1;i++) {
            temp=temp+A[i];
        }
        temp=temp+day2;
    }
    n=n+temp;
    printf("%ld\n", n);
    return 0;
}
int main()
{int i,j=1,startyear,endyear,startmonth,endmonth,startday,endday;
int dou=0;
long days,p;
int	a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},b[1000]={0};
cin>>startyear>>startmonth>>startday>>endyear>>endmonth>>endday;
for(i=1;i<=3000;i++)
	if((i%4==0&&i%100!=0)||i%400==0)
		{b[j]=i;/*????(year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)? 
???2???29?*/
		j++;
		}
for(i=1;i<j;i++){
	if(startyear<b[i]&&b[i]<endyear)
		dou=dou+1;
	if(startyear==b[i]&&startmonth<=2)
		dou=dou+1;
	if(endyear==b[i]&&endmonth>=3)
			dou=dou+1;}
p=endyear-startyear;
days=p*365;
if(startmonth<endmonth)
	for(i=startmonth;i<endmonth;i++)
		days=days+a[i];
if(startmonth>endmonth)
	{for(i=startmonth;i<=12;i++)
		days=days+a[i];
	for(i=1;i<endmonth;i++)
			days=days+a[i];
	days=days-365;}
days=days+dou+endday-startday;
cout<<days<<endl;//???????????????

return 0;
}
int Inyear(int month,int day,int year,int i,int output)
{
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			output+=31;
		else if(i==4||i==6||i==9||i==11)
			output+=30;
		else if(i==2&&((year%4==0&&year%100!=0)||(year%400==0)))
			output+=29;
		else
			output+=28;
	}
	output+=day;
	return output;
}

int main()
{
	int year[2],month[2],day[2],output=0,inyear,i;
	scanf("%d%d%d%d%d%d",&year[0],&month[0],&day[0],&year[1],&month[1],&day[1]);
	output=Inyear(month[1],day[1],year[1],i,inyear)-Inyear(month[0],day[0],year[0],i,inyear);
	for(i=year[0];i<year[1];i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			output+=366;
		else 
			output+=365;
	}
	printf("%d",output);
	return 0;
}
int main()
{
	int y1,y2,m1,m2,d1,d2;
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31},b[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	int sum=0;
	int i;
	if(y1==y2)
	{
		if(m1==m2)
			sum=d2-d1;
		else
		{
		if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
		{
			for(i=m1+1;i<m2;i++)
				sum+=b[i-1];
			sum=sum+b[m1-1]-d1+d2;
		}
		else
		{
			for(i=m1+1;i<m2;i++)
				sum+=a[i-1];
			sum=sum+a[m1-1]-d1+d2;
		}
		}
	}
	else
	{
	for(i=y1+1;i<y2;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)) 
			sum+=366;
		else
			sum+=365;
	}
	if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
	{
		for(i=m1+1;i<=12;i++)
		{
			sum+=b[i-1];
		}
		sum+=b[m1-1]-d1;
	}
	else
	{
		for(i=m1+1;i<=12;i++)
		{
			sum+=a[i-1];
		}
		sum+=a[m1-1]-d1;
	}
	if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
	{
		for(i=1;i<m2;i++)
		{
			sum+=b[i-1];
		}
		sum+=d2;
	}
	else
	{
		for(i=1;i<m2;i++)
		{
			sum+=a[i-1];
		}
		sum+=d2;
	}
	}
	cout<<sum<<endl;
		return 0;
}
int god(int y,int m,int d);
int main(void)
{
	int year1,month1,day1,year2,month2,day2;
	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
		printf("%d",god(year2,month2,day2)-god(year1,month1,day1));
				
	getchar();
	return 0;
}
int god(int y,int m,int d)
{
	int sum =0,ctr;
	for(ctr=1;ctr<y;ctr++)
	{
		if((ctr % 4 == 0 && ctr % 100 != 0) || (ctr % 400 == 0))
			sum+=366;
		else
			sum+=365;
	}
	switch(m)
	{
	case 12:
		sum+=30;
	case 11:
		sum+=31;
	case 10:
		sum+=30;
	case 9:
		sum+=31;
	case 8:
		sum+=31;
	case 7:
		sum+=30;
	case 6:
		sum+=31;
	case 5:
		sum+=30;
	case 4:
		sum+=31;
	case 3:
		{
		if((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))
			sum+=29;
		else sum+=28;
		   }
	case 2:sum+=31;
	case 1:
	default:sum+=d;
		break;
	}
												
   	return sum;
}
int main()
{
	int a1,a2,a3,b1,b2,b3,t1,t2,d;
	scanf("%d%d%d",&a1,&a2,&a3);
	scanf("%d%d%d",&b1,&b2,&b3);
	if ((a1%4==0&&a1%100!=0)||(a1%400==0))
	{
		if(a2<=2)
			t1=(a2-1)*31+a3;
		else if (a2<=7)
		{
			if (a2%2==1)
				t1=(a2-2)/2*61+a3+60;
			else 
				t1=((a2-2)/2-1)*61+a3+31+60;
		}
		else if (a2>7)
		{
			if (a2%2==1)
				t1=213+((a2-7)/2-1)*61+31+a3;
			else
				t1=213+(a2-7)/2*61+a3;
		}
		if ((b1%4==0&&b1%100!=0)||(b1%400==0))
		{
			if(b2<=2)
				t2=(b2-1)*31+b3;
			else if (b2<=7)
			{
				if (b2%2==1)
					t2=(b2-2)/2*61+b3+60;
				else 
					t2=((b2-2)/2-1)*61+b3+31+60;
			}
			else if (b2>7)
			{
				if (b2%2==1)
					t2=213+((b2-7)/2-1)*61+31+b3;
				else
					t2=213+(b2-7)/2*61+b3;
			}
		d=(b1-a1)*(366+365*3)/4+t2-t1;
		}
		else
		{
			if(b2<=2)
				t2=(b2-1)*31+b3;
			else if (b2<=7)
			{
				if (b2%2==1)
					t2=(b2-2)/2*61+b3+60-1;
				else 
					t2=((b2-2)/2-1)*61+b3+31+60-1;
			}
			else if (b2>7)
			{
				if (b2%2==1)
					t2=213+((b2-7)/2-1)*61+31+b3-1;
				else
					t2=213+(b2-7)/2*61+b3-1;
			}
		d=((b1-a1)/4)*(366+365*3)+(b1-a1-((b1-a1)/4)*4)*366+t2-t1;
		}

	}
	else 
	{
		if(a2<=2)
			t1=(a2-1)*31+a3;
		else if (a2<=7)
		{
			if (a2%2==1)
				t1=(a2-2)/2*61+a3+60-1;
			else 
				t1=((a2-2)/2-1)*61+a3+31+60-1;
		}
		else if (a2>7)
		{
			if (a2%2==1)
				t1=213+((a2-7)/2-1)*61+31+a3-1;
			else
				t1=213+(a2-7)/2*61+a3-1;
		}
		if ((b1%4==0&&b1%100!=0)||(b1%400==0))
		{
			if(b2<=2)
				t2=(b2-1)*31+b3;
			else if (b2<=7)
			{
				if (b2%2==1)
					t2=(b2-2)/2*61+b3+60;
				else 
					t2=((b2-2)/2-1)*61+b3+31+60;
			}
			else if (b2>7)
			{
				if (b2%2==1)
					t2=213+((b2-7)/2-1)*61+31+b3;
				else
					t2=213+(b2-7)/2*61+b3;
			}
		d=((b1-a1)/4)*(366+365*3)+(b1-a1-((b1-a1)/4)*4)*365+t2-t1;
		}
		else
		{
			if(b2<=2)
				t2=(b2-1)*31+b3;
			else if (b2<=7)
			{
				if (b2%2==1)
					t2=(b2-2)/2*61+b3+60-1;
				else 
					t2=((b2-2)/2-1)*61+b3+31+60-1;
			}
			else if (b2>7)
			{
				if (b2%2==1)
					t2=213+((b2-7)/2-1)*61+31+b3-1;
				else
					t2=213+(b2-7)/2*61+b3-1;
			}
		d=(b1-a1)/4*(366+365*3)+(b1-a1-((b1-a1)/4)*4)*365+t2-t1;
		}
	}
         if ((b1-a1)>=100)
         d=d-1;
	printf("%d\n",d);
	return 0;
}
int rr(int year){
  if((year%4==0&&year%100!= 0)||(year%400==0))
          return 1;
          else return 0;
          }    
int main(){
    int y1,m1,d1,y2,m2,d2,p=0,x=0,y=0,a=0,b=0,i;
    int aa[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    cin>>y1>>m1>>d1>>y2>>m2>>d2;
    for(i=y1+1;i<y2;i++)
      p=p+365+rr(i);
    for(x=1;x<m1;x++)
     {  if(x==2)
       a=a+aa[x]+rr(y1);
       else a=a+aa[x];
       }
      a=a+d1;
    for(x=1;x<m2;x++)
     {  if(x==2)
       b=b+aa[x]+rr(y2);
       else b=b+aa[x];
       }
      b=b+d2;
      cout<<(365+rr(y1))*(y1!=y2)+p+b-a;
         return 0;
      }
/* Name        : ???????????
 * Version     : 1.0
 * Date        : 2013-01-12
 * New         : 
 * Description : 
 * State       : Design
 */
int R(int Y)
{
    return Y/4-Y/100+Y/400;
}
int RY(int Y)
{
    if ((Y%4==0 && Y%100!=0) || (Y%400==0)) return 1;
    else return 0;
}
int RM(int M,int Y)
{
    switch (M)
    {
        case  1:return 0;
        case  2:return 1;
        case  3:return -1+RY(Y);
        case  4:return 0+RY(Y);
        case  5:return 0+RY(Y);
        case  6:return 1+RY(Y);
        case  7:return 1+RY(Y);
        case  8:return 2+RY(Y);
        case  9:return 3+RY(Y);
        case 10:return 3+RY(Y);
        case 11:return 4+RY(Y);
        case 12:return 4+RY(Y);
    }
}
int main()
{
    int Ya,Yb,Ma,Mb,Da,Db;
    int Sa,Sb;
    cin>>Ya>>Ma>>Da;
    cin>>Yb>>Mb>>Db;
    Sa=365*(Ya-1)+30*(Ma-1)+Da+R(Ya-1)+RM(Ma,Ya);
    Sb=365*(Yb-1)+30*(Mb-1)+Db+R(Yb-1)+RM(Mb,Yb);
    cout<<Sb-Sa;
    return 0;
}
int main()
{
	int sum = 0;
	int year1 , year2;
	int month1 , month2;
	int day1 , day2;
	cin >> year1 >> month1 >> day1;
	cin >> year2 >> month2 >> day2;
	int mon[13] = { 0 , 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 };

	int year , month , day;
	int days;
	for( year = year1 ; year < year2 ; year ++ )
	{
		if( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0 ))
			days = 366;
		else
			days = 365;
		sum = sum + days;
	}
	for( month = 1 ; month < month1 ; month ++ )
	{
		if( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0 ) )
			mon[2] = 29;
		sum = sum - mon[month];
	}
	for( day = 1 ; day < day1 ; day ++ )
		sum --;
	for( month = 1 ; month < month2 ; month ++ )
	{
		if( (year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0 ) )
			mon[2] = 29;
		sum = sum + mon[month];
	}
	for( day = 1 ; day < day2 ; day ++ )
		sum ++;
	cout << sum;


	return 0;
}
void main()
{
	int a,b,c,d,e,f,g,h,j,k,n;
	h=0;
	int t(int l,int m);
	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)+h+t(a,b)-t(d,e)-j+k-c+f;
	printf("%d\n",n);
}
int t(int l,int m)
{
	int i=0;
	if(l%400==0||(l%4==0&&l%100!=0)&&(m==1||m==2))
	i=1;
	return(i);
}
int day_of_year(int n)
{
  if(n%400==0) return 366;
  if((n%4==0)&&(n%100!=0)) return 366; else return 365;
}

int day_of_month(int month,int year)
{
 if(month==2)
  if(day_of_year(year)==366) return 29;else return 28;
 if((month==4)||(month==6)||(month==9)||(month==11)) return 30;
 else return 31;
}

int main()
{
 int year1,year2,month1,month2,day1,day2,i,j,sum,sumyear,summonth1,summonth2;
 scanf("%d %d %d\n%d %d %d",&year1,&month1,&day1,&year2,&month2,&day2);
 sum=sumyear=summonth1=summonth2=0;
 for(i=year1;i<year2;i++)
  sumyear+=day_of_year(i);
 for(i=1;i<month1;i++)
 summonth1=summonth1+day_of_month(i,year1);
 for(i=1;i<month2;i++)
 summonth2=summonth2+day_of_month(i,year2);
 sum=sumyear+summonth2+day2-summonth1-day1;
 printf("%d",sum);
 scanf("%d",&i);
 return 0;
}