main :: IO() main = do l <- getLine let num = read l :: Integer print $ (num `mod` 1000000007)