import datetime as D

while 1:

  a,b,c,d,e,f=x=list(map(int,input().split(" ")))

  if min(x)<0: break

  print((D.date(d,e,f)-D.date(a,b,c)).days)
import datetime as D

while 1:

  a,b,c,d,e,f=x=list(map(int,input().split(" ")))

  if any([i<0 for i in x]): break

  print((D.date(d,e,f)-D.date(a,b,c)).days)
import datetime as D

while 1:
    a, b, c, d, e, f = x = list(map(int, input().split(" ")))
    if min(x) < 0:
        break
    print((D.date(d, e, f) - D.date(a, b, c)).days)

import datetime as D

while 1:
    a, b, c, d, e, f = x = list(map(int, input().split(" ")))
    if any([i < 0 for i in x]):
        break
    print((D.date(d, e, f) - D.date(a, b, c)).days)

-    if min(x) < 0: +    if any([i < 0 for i in x]):