const input = require("fs").readFileSync("/dev/stdin", "utf8")

const lines = input.split('\n')
let S = lines[0].trim()

if (S[S.length - 1] === 's') {
    S += 'es'
} else {
    S += 's'
}

console.log(S)
