s = input() now = s[0] ans = s[0] for i in range(1, len(s)): if now == s[i]: pass else: ans += s[i] now = s[i] print(ans)