
function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    let S = input[0][0];
    if (S[S.length - 1] == 's') console.log(S + "es");
    else console.log(S + "s");
}



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