import sys
from collections import Counter
from collections import deque
import math
import fractions
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

s=input()
n=len(s)
c0=0
c1=0
for i in range(n):
    if s[i]=="0":
        c0+=1
    else:
        c1+=1
print(2*min(c0,c1)) import sys sys from collections import Counter from collections import deque import math math import fractions fractions def input(): return sys.stdin.readline().strip() input def mp(): return map(int,input().split()) mp def lmp(): return list(map(int,input().split())) lmp s=input() s input() input n=len(s) n len(s) len s c0=0 c0 0 c1=0 c1 0 for i in range(n):
    if s[i]=="0":
        c0+=1
    else:
        c1+=1 i range(n) range n if s[i]=="0":
        c0+=1
    else:
        c1+=1 s[i]=="0" s[i] s i "0" c0+=1 c0 1 c1+=1 c1 1 print(2*min(c0,c1)) print 2*min(c0,c1) 2 min(c0,c1) min c0 c1 n=len(s) len(s) n c1+=1 1 c1 c1=0 0 c1 c0=0 0 c0 def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input def lmp(): return list(map(int,input().split())) def lmp(): return list(map(int,input().split())) lmp s=input() input() s def mp(): return map(int,input().split()) def mp(): return map(int,input().split()) mp c0+=1 1 c0
import sys
from collections import Counter
from collections import deque
import math
import fractions
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

s=input()
n=len(s)
c0=0
c1=0
for i in range(n):
    if s[i]=="0":
        c0+=1
    else:
        c1+=1
print(2*min(c0,c1))