#coding:utf-8

import sys
S=map(int,raw_input())

st=[]

ans=0
for s in S:
    st.append(s)
    if len(st)>=2:
        a=st.pop()
        b=st.pop()
    else:
        continue
    if (a==0 and b==1) or (a==1 and b==0):
        ans+=2
    else:
        st.append(a);st.append(b)
print(ans)