main = do n <- readLn print $ 2017 - n