function Main(input) {
  const t = input[input.length - 1];
  if (t === 'e') {
    input += 's';
  } else {
    input += 'es';
  }
  console.log(input);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
