"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = (arg[0].split(" ")[0]);
    
    console.log(S.slice(-1) == "s" ? S + "es" : S + "s");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));