#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    string s;
    cin >> s;
    if(s[s.size() - 1] == s)
        cout << s + "es" << "\n";
    else
        cout << s + "s" << "\n";
}

