import Control.Applicative
import Control.Monad (unless)
import Data.Maybe
import qualified Data.Time as T

main = do
    list <- map read.words<$>getLine
    unless (any (<0) list) $ do
        let [y1,m1,d1,y2,m2,d2] = list
            day1 = T.fromGregorian (toInteger y1) m1 d1
            day2 = T.fromGregorian (toInteger y2) m2 d2
        print $ T.diffDays day2 day1
        main
