s = input() n = len(s) t = [] for i, si in enumerate(s): if i + 1 < n and si == s[i + 1]: continue t.append(si) print("".join(t))