import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.Char
import Data.List

-- space delimited integers
getVals::IO [Int]
getVals = unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine
 

-- space delimited strings
getStrings::IO [String]
getStrings = (map BS.unpack . BS.words) <$> BS.getLine

main::IO()
main = do 
    str<-getLine
    putStrLn $ if last str == 's' then str ++ "es" else str ++ "s"