x = input()
i = 0
cnt = 1
while (i < len(x)) :
if (x[i] == x[i+1]) :
cnt = cnt + 1
else:
print(x[i], end='')
print(cnt, end='')
cnt=1