S = input() N = len(S) T = S[0] c = S[0] i = 1 while i < N: if S[i] == c: i += 1 continue T += S[i] c = S[i] i += 1 print(T)