main = do x <- getLine putStrLn $ show . abs $ (length x) - (length "1000000007")