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