import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.next(); int i = 0; while(i < s.length()){ if(i == s.length()-1){ System.out.print(s.charAt(i)); break; } else if(s.charAt(i) != s.charAt(i+1)){ System.out.print(s.charAt(i)); i++; } else{ System.out.print(s.charAt(i)); i += 2; } } System.out.println(); } }