object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datS) = readLine.split(" ")

    val ans = datS + (if (datS.last != 's') "s" else "es")

    println(ans)
  }
}
