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