s = str(input()) t = [] for c in s: if t: if t[-1] == c: continue else: t.append(c) else: t.append(c) print(''.join(t))