S = input() ans = S[0] for i in range(1, len(S)): if S[i] != S[i - 1]: ans += S[i] print(ans)