import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

S = list(s())
xx = Counter(S)
print(min(xx["0"],xx["1"])*2) import sys sys import math math import itertools itertools import bisect bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() s def i(): return int(input()) i def S(): return input().split() S def I(): return map(int,input().split()) I def L(): return list(input().split()) L def l(): return list(map(int,input().split())) l def lcm(a,b): return a*b//math.gcd(a,b) lcm a a b b sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 S = list(s()) S list(s()) list s() s xx = Counter(S) xx Counter(S) Counter S print(min(xx["0"],xx["1"])*2) print min(xx["0"],xx["1"])*2 min(xx["0"],xx["1"]) min xx["0"] xx "0" xx["1"] xx "1" 2 def I(): return map(int,input().split()) def I(): return map(int,input().split()) I xx = Counter(S) Counter(S) xx def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm def s(): return input() def s(): return input() s def S(): return input().split() def S(): return input().split() S def L(): return list(input().split()) def L(): return list(input().split()) L mod = 10**9+7 10**9+7 mod def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l def i(): return int(input()) def i(): return int(input()) i S = list(s()) list(s()) S
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

S = list(s())
xx = Counter(S)
print(min(xx["0"],xx["1"])*2)
