S = input() i = 0 l = [] while i < len(S): if i == len(S)-1: l.append(S[i]) i += 1 continue l.append(S[i]) if S[i+1] == S[i]: i += 2 else: i += 1 print("".join(l))