function spilitInput(input) {
  var splited = [];
  var rows = input.split('\n');
  for (var i = 0; i < rows.length; i += 1) {
    splited.push(rows[i].split(' '));
  }
  return splited;
}
function Main(input) {
  var splited = spilitInput(input);
  var S = splited[0][0];
  var last_s = S.slice(-1);
  if (last_s == 's') {
    console.log(S+'es');
  } else {
    console.log(S+'s');
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));