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