#include <bits/stdc++.h>
using namespace std;

int GregorianDay(int y, int m, int d) {
    y += 4800;
    if (m < 3) {--y; m += 12;}
    return 365*y+y/4-y/100+y/400+(153*m-457)/5+d-32083;
}

int main() {
    int y[2], m[2], d[2];
    while (cin >> y[0] >> m[0] >> d[0] >> y[1] >> m[1] >> d[1]) {
        if (y[0] == -1) break;
        int day[2];
        for (int i = 0; i < 2; ++i) day[i] = GregorianDay(y[i], m[i], d[i]);
        cout << day[1] - day[0] << endl;
    }
}
