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