const main = (arg) => {
    let word = arg
    if(word[word.length-1]=="s") {
        console.log(word + "es")
    } else {
        console.log(word + "s")
    }

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
