def RunLengthEncoding(S): res = [] N = len(S) i = 0 while i < N: cnt = 1 while i < N - 1 and S[i] == S[i + 1]: cnt += 1 i += 1 res.append((S[i], cnt)) i += 1 return res S = RunLengthEncoding(input()) ans = "".join(k for k, v in S) print(ans)