S = input() + "#" l = len(S) ans = "" i = 0 while i < l - 1: #ans += S[i] print(S[i], end = "") if S[i] == S[i + 1]: i += 2 else: i += 1 #print(ans)