#include <bits/stdc++.h>
using namespace std;
vector<int> mtod={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int before(int y){
return y*365+y/4-y/100+y/400;
}
int thisyear(int y, int m, int d){
int ds(d);
for(int i=1; i<=m-1; i++) ds+=mtod[i];
if((y%4==0 and (y%100 or y%400==0)) and m>2) ds++;
return ds;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int y1, y2, m1, m2, d1, d2;
while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
int rd1, rd2;
rd1=before(y1-1)+thisyear(y1, m1, d1);
rd2=before(y2-1)+thisyear(y2, m2, d2);
cout<<abs(rd1-rd2)<<'\n';
}
return 0;
}