
object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val s = sc.next()
  val last = s(s.length-1)
  if (last == 's') {
    println(s + "es")
  } else {
    println(s + "s")
  }
}
