unittest
{
	assert( [ "apple" ].solve == "apples" );
	assert( [ "bus" ].solve == "buses" );
	assert( [ "box" ].solve == "boxs" );
}



import std.conv;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto s = input.front;
	
	return s ~ ( ( s.back == 's' ) ? "es" : "s" );
}
