S = str(input()) N = len(S) ans = S[0] before = S[0] for i in range(1,N): if S[i] == before: pass else: ans += S[i] before = S[i] print(ans)