# -*- coding: utf-8 -*-

S = input().strip()
#-----

cnt=0
while (S.count("01") != 0) or (S.count("10") != 0):
    cnt += S.count("01")
    S = S.replace("01", "")
    
    cnt += S.count("10")
    S = S.replace("10", "")
    
print(cnt*2)
