S = input() Ans = "" cnt = 0 for i in S: if cnt == 0: Ans += i else: if i != S[cnt-1]: Ans += i cnt += 1 print(Ans)