require 'date'
loop do
    y1,m1,d1,y2,m2,d2 = gets.split.map{|i| i.to_i}
    if y1==-1 || m1==-1 || d1==-1 || y2==-1 || m2==-1 || d2==-1 then break end
    date1 = Date.new(y1,m1,d1)
    date2 = Date.new(y2,m2,d2)
    puts date2-date1
end