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