input :: IO String
input = getLine

pluralForm :: String -> String
pluralForm str = case last str of
  's' -> str ++ "es"
  _   -> str ++ "s"


main :: IO ()
main = do
  str <- input
  putStrLn . pluralForm $ str
  return ()
