#include <bits/stdc++.h>
#include <vector>
#include <string>
#include <iomanip>
#include <math.h>
#include <algorithm>
using namespace std;
//My macros............................!
#define hmm "\n"
#define test() int t; cin>>t; while(t--)
#define ll long long int
#define ull unsigned long long
#define read_i(x)	scanf("%d",&x)
#define read_l(x)	scanf("%lld",&x)
#define read_s(s)	scanf("%s",s)
#define print_i(x)	printf("%d\n",x)
#define print_l(x)	printf("%lld\n",x)
#define print_s(s)	printf("%s\n",s)
#define INF (int)1e9
#define PI 3.1415926535897932384626
#define MOD 1000000007
#define FOR(i, j, k, in) for (int i = j; i < k; i += in)
//#define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in)
//#define REP(i, j) FOR(i, 0, j, 1)
//#define RREP(i, j) RFOR(i, j, 0, 1)
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ps(x,y) fixed<<setprecision(y)<<x;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());

//Functions poto type........................!

bool is_prime(int n);   // return bool value. Is it prime or not? 
int absolutey(int a);   //returns absolute value of an integer
string eliminateAt(string x, int num);  //eliminates a single substring of a string in a given position
ll factorial(int num);
ll to_the_power(int x,int y);
ll n_P_r(ll n, ll r);
ll n_C_r(ll n, ll r);
void solve()    
{
    string s;
    cin>>s;
    int l= s.size();
    if(s[l-1]!='s'){
        s+='s';
    }
    else if(s[l-1]=='s'){
        s+="es";
    }
    cout<<s<<endl;
}

///My main function.........................!
int main()
{
//#ifndef ONLINE_JUDGE
	//freopen("r.txt", "r", stdin);
	//freopen("w.txt", "w", stdout);
//#endif

    fastIO
    //test()
        solve();
}



// Functions.................................!!

bool is_prime(ll n){ // return bool value. Is it prime or not? 
    if(n<2)
        return 0;
    if(n==2)
        return 1;
    if(n%2==0)
        return 0;
    int r= sqrt(n);
    for(int i=3; i<=r; i+=2){
        if(n%i==0) 
            return 0;
    }
    return 1;
}
int absolutey(ll a) //returns absolute value of an integer
{   
    return ((a<0 ? (a*-1): a));
}
string eliminateAt(string x, ll num)//eliminates a single substring of a string in a given position
{
    if(num==0){
        return x.substr(1,x.length()-1);
    }
    else if(num==x.length()-1){
        return x.substr(0,x.length()-1);
    }
    else{
        return x.substr(0,num)+x.substr(num+1,x.length()-1);
    }
}
ll factorial(ll num){
    if(num==0)
        return 1;
    return (num*factorial(num-1));
}
ll to_the_power(ll x,ll y){
    ll result=1;
    while (y>0)
    {
        if(y%2==1) result*=x;
        x*=x;
        y/=2;
    }
    return result;
}
ll n_P_r(ll n, ll r){
    return (factorial(n)/(factorial(n-r)));
}
ll n_C_r(ll n, ll r){
    return (n_P_r(n,r)/factorial(r));
}

Measured memory_bytes: 3672