main :: IO () main = do n <- fmap read getLine print $ 52 * (n - 1) + 316