      PROGRAM piyo
      IMPLICIT NONE
      character(1000) :: s
      integer :: len
      
      read*,s
      len = len_trim( s )
      
      
      if(s(len:len)=='s')then
        print*,s(1:len)//'es'
      else
        print*,s(1:len)//'s'
      end if
      
      
      
      stop
      !debugg
      
      
      
      END PROGRAM