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