object Main extends App {
  import scala.annotation.tailrec
  
  @tailrec
  def help(s:List[Char],t:List[Char]):List[Char] = {
    s match {
      case h0::h1::tail => help(tail,h0::t)
      case h::Nil => (h::t).reverse
      case _ => t.reverse
    }
  }
  
  val s = readLine.toList
  println(help(s,Nil).mkString)
}