#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <functional>
#include <algorithm>
using namespace std;

typedef long long ll;

int days[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 main()
{
    int y1, m1, d1, y2, m2, d2;
    while(cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 && y1 != -1) {
        int ret = 0, m = m1, y = y1;
        for(;;) {
            int f;
            if(y % 4 == 0) {
                if(y % 100 == 0) {
                    if(y % 400 == 0) {
                        f = 1;
                    } else {
                        f = 0;
                    }
                } else {
                    f = 1;
                }
            } else {
                f = 0;
            }
            
            if(y == y2 && m == m2) {
                ret += d2 - d1;
                break;
            } else {
                ret += days[f][m - 1];
            }
            
            if(m == 12) {
                y++; m = 1;
                continue;
            } else {
                m++;
            }
            
        }
        cout << ret << endl;
    }
}