#include <iostream>
using namespace std;

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

int main() {
    int date1, date2;
    while (scanf("%d%d", &date1, &date2) != EOF) { // 注意 while 处理多个 case
        int year1 = 0, year2 = 0;
        int month1 = 0, month2 = 0;
        int day1 = 0, day2 = 0;
        //算日期
        int x1 = date1 % 10;
        date1 /= 10;
        int x2 = date1 % 10;
        date1 /= 10;
        day1 = x1 + x2 * 10;
        x1 = date2 % 10;
        date2 /= 10;
        x2 = date2 % 10;
        date2 /= 10;
        day2 = x1 + x2 * 10;
        //算月份 年份
        x1 = date1 % 10;
        date1 /= 10;
        x2 = date1 % 10;
        date1 /= 10;
        month1 = x1 + x2 * 10;
        x1 = date2 % 10;
        date2 /= 10;
        x2 = date2 % 10;
        date2 /= 10;
        month2 = x1 + x2 * 10;
        year1 = date1;
        year2 = date2;

        //把year1变成小的日期
        if (year1 < year2 || year1 == year2 && month1 < month2
                || year1 == year2 && month1 == month2 && day1 < day2) { //不用交换的情况

        } else {
            int t = year1;
            year1 = year2;
            year2 = t;
            t = month1;
            month1 = month2;
            month2 = t;
            t = day1;
            day1 = day2;
            day2 = t;
        }

        int count = 0;
        while (year1 != year2 || month1 != month2 || day1 != day2) {
            day1++;
            count++;
            if (day1 > days[month1]) {
                month1++;
                day1 = 1;
            }
            if (month1 > 12) {
                year1++;
                month1 = 1;
            }
        }
        printf("%d\n", count + 1);
    }
}
// 64 位输出请用 printf("%lld")