def leap? year
    result = false
    result = true if year % 4 == 0
    result = false if year % 100 == 0
    result = true if year % 400 == 0
    return result
end

def days year, month, day
    n_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    sum = 0
    1.upto(year-1){|y| sum += (leap? y) ? 366 : 365}
    1.upto(month-1){|m|
        sum += n_days[m-1]
        sum += 1 if leap?(year) && m == 2
    }
    1.upto(day){|d| sum += 1}
    return sum
end

while true
    y1,m1,d1,y2,m2,d2 = gets.chomp.split.map(&:to_i)
    break if [y1,m1,d1,y2,m2,d2].any?{|x| x < 0}
    puts days(y2, m2, d2) - days(y1, m1, d1)
end
