import math
from collections import Counter
s = list(input())
s = list(map(int, s))
dict_s = Counter(s)
#print(dict_s)
print((min(dict_s[0], dict_s[1]))*2) import math math from collections import Counter s = list(input()) s list(input()) list input() input s = list(map(int, s)) s list(map(int, s)) list map(int, s) map int s dict_s = Counter(s) dict_s Counter(s) Counter s print((min(dict_s[0], dict_s[1]))*2) print (min(dict_s[0], dict_s[1]))*2 min(dict_s[0], dict_s[1]) min dict_s[0] dict_s 0 dict_s[1] dict_s 1 2 dict_s = Counter(s) Counter(s) dict_s s = list(input()) list(input()) s s = list(map(int, s)) list(map(int, s)) s
import math
from collections import Counter
s = list(input())
s = list(map(int, s))
dict_s = Counter(s)
#print(dict_s)
print((min(dict_s[0], dict_s[1]))*2)