open Printf
open Scanf

let input_string () =
  scanf "%s\n" (fun s -> s)

let f () =
  let s = input_string () in
  let n = String.length s in
  if n = 0 || s.[n-1] <> 's' then
    printf "%ss\n" s
  else
    printf "%ses\n" s

let () = f ()
