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