import java.util.*
import kotlin.math.*

fun main() {
    val n = readString()

    if (n.last() == 's') {
        println(n + "es")
    } else {
        println(n + "s")
    }
}

fun readString() = readLine()!!