ss = input()+'**'
n = len(ss)
arrs = [ss[0]]

for i in range(1, n):
  if len(arrs[-1]) == 2:
    if arrs[-1].endswith(ss[i]):
      continue
    else:
      arrs.append(ss[i])
  else:
    if ss[i-1] == ss[i]:
      arrs.append(ss[i: i+2])
    else:
      arrs.append(ss[i])
while '*' in arrs:
  arrs.remove('*')

print(arrs)
print(len(arrs)) 