require 'date'

def main
  if true then
    fh=STDIN
  else
    fh=open("in1_0125.txt")
  end

  while fh.gets do
    y1,m1,d1,y2,m2,d2 = $_.chomp.split.map{|x| x.to_i}
    break if y1<0 or m1<0 or d1<0 or y2<0 or m2<0 or d2<0

    d1=Date.new(y1,m1,d1)
    d2=Date.new(y2,m2,d2)
    puts (d2-d1).to_i
  end

end

if $0 == __FILE__ then
  main
end