import sys input = sys.stdin.readline S=input().strip() ANS=[] for s in S: if ANS and s==ANS[-1]: continue else: ANS.append(s) print("".join(ANS))