s = input()
ls = list(map(int,list(s)))
lt = [0]
for i in range(1,len(s)):
  lt.append(ls[i-1]+ls[i])

ans = 0
while 1 in lt:
  flg = 1
  n = len(ls)
  for i in range(1,n):
    if flg == 1 and lt[n-i] == 1:
      ls = ls[:n-i-2] + ls[n-i:]
      ans += 2
      flg = 0
    elif flg == 0:
      flg = 1
  lt = [0]
  for i in range(1,len(ls)):
    lt.append(ls[i-1]+ls[i])
print(ans)