import Data.List

main :: IO ()
main = do
       str <- getLine
       putStrLn $ solve str
       
solve :: String -> String
solve str | isSuffixOf "s" str == True = str ++ "es"
          | otherwise                  = str ++ "s"