require 'date'

while true
  y1, m1, d1, y2, m2, d2 = gets.strip.split(' ').map(&:to_i)
  if y1 == -1; break; end
  day1 = Date.new(y1, m1, d1)
  day2 = Date.new(y2, m2, d2)
  diff = 0
  while day1 != day2
    day1 += 1
    diff += 1
  end
  p diff
end