str = input() ans="" i = 0 while i < len(str): if i+1 < len(str) and str[i] == str[i + 1]: ans += str[i] i += 2 else: ans += str[i] i += 1 print(ans)