S=input() T=[S[i] for i in range(len(S)) if i==0 or S[i-1]!=S[i]] print(*T,sep="")