function main(input) {
  const n = input[0];
  if(n[n.length-1]==="s"){
    console.log(n+"es");
  }else{
    console.log(n+"s");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));