main :: IO ()
main = do
  ls <- getLine
  let ls' = map read . words $ ls
  if any (0 > ) ls'
    then return ()
    else do
      print $ solve ls'
      main

solve :: [Int] -> Int
solve [y1,m1,d1,y2,m2,d2] = (getDay y2 m2 d2) - (getDay y1 m1 d1)
  where
    getDay :: Int -> Int -> Int -> Int
    getDay y m d = 365 * (y - 1) + (uru (y-1)) + (getDay2 y m d)
      where
        uru :: Int -> Int
        uru y = (y `div` 4) - (y `div` 100) + (y `div` 400)

        getDay2 :: Int -> Int -> Int -> Int
        getDay2 y m d = (sumDay (m-1) (months y)) + d

        sumDay :: Int -> [Int] -> Int
        sumDay 0 _ = 0
        sumDay n (x:xs) = x + (sumDay (n - 1) xs)

        months :: Int -> [Int]
        months y
          | ((y `mod` 4) == 0 && (y `mod` 100) /= 0) || (y `mod` 400) == 0 = [31,29,31,30,31,30,31,31,30,31,30,31]
          | otherwise = [31,28,31,30,31,30,31,31,30,31,30,31]