function Main(input){
  input = input.split("\n")[0];
  
  let answer;
  if(input.substr(-1)==="s"){
    answer = input + "es";
  }else{
    answer = input + "s";
  }
  console.log('%s',answer);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));