import java.util.*

fun main() {
    val sc = Scanner(System.`in`)
    val s = sc.next()

    println(calc(s))
}

fun calc(s: String): String {
    return if(s.endsWith("s")) {
        "${s}es"
    }
    else {
        "${s}s"
    }
}