N=input()
tmp=""
ans=""
for i in N:
    if tmp==i:
        continue
    else:
        tmp=i
        ans+=tmp
print(ans)