const main = stdin => {
  const input = stdin.trim().split('\n')
  const S = input[0]
  console.log(S[S.length - 1] === 's' ? S + 'es' : S + 's');
}


// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
