let input = require('fs').readFileSync('/dev/stdin', 'utf8')
// let input = require('fs').readFileSync('./sample_a.txt', 'utf8')
.split(/\n| /)
// .map(item => parseInt(item))
.slice(0,-1)

const [S] = input
if(S.slice(-1) === "s"){
    console.log(`${S}es`)
}else{
    console.log(`${S}s`)
}