s = list(input())

def check_pair(array,ans=0):
    if len(array) < 2:
        return ans
    for i, a in enumerate(array[:-1]):
        if (a=='0' and array[i+1]=='1') or (a=='1' and array[i+1]=='0'):
            del array[i:i+2]
            ans += 2
            return check_pair(array, ans)
    return ans

s = check_pair(s)

print(s)