S = input() n = len(S) ANS = [] i = 0 while i < n: if i == n - 1: ANS.append(S[i]) i += 1 elif S[i] == S[i + 1]: ANS.append(S[i]) i += 2 else: ANS.append(S[i]) i += 1 print(''.join(ANS))