while true
  date = gets.scan(/\-?[0-9]+/)
  break   if date[0].to_i == -1 && date[1].to_i == -1 && date[2].to_i == -1 && date[3].to_i == -1 && date[4].to_i == -1 && date[5].to_i == -1
  day_source = Time.local(date[0], date[1], date[2], 0, 0, 0)
  day_target = Time.local(date[3], date[4], date[5], 0, 0, 0)
  difference = (day_target - day_source).divmod(24*60*60)
  puts difference[0].to_i
end