import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

s = ns()
n = len(s)
b = s.count('0')
r = n - b
print(2 * min(b, r)) import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy math string itertools fractions heapq collections re array bisect sys random time copy sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 inf = 10**20 inf 10**20 10 20 mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 stdin = sys.stdin stdin sys.stdin sys stdin ni = lambda: int(ns()) ni lambda: int(ns()) int(ns()) int ns() ns na = lambda: list(map(int, stdin.readline().split())) na lambda: list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split ns = lambda: stdin.readline().rstrip() ns lambda: stdin.readline().rstrip() stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip s = ns() s ns() ns n = len(s) n len(s) len s b = s.count('0') b s.count('0') s.count s count '0' r = n - b r n - b n b print(2 * min(b, r)) print 2 * min(b, r) 2 min(b, r) min b r r = n - b n - b r b = s.count('0') s.count('0') b na = lambda: list(map(int, stdin.readline().split())) lambda: list(map(int, stdin.readline().split())) na n = len(s) len(s) n ni = lambda: int(ns()) lambda: int(ns()) ni inf = 10**20 10**20 inf s = ns() ns() s mod = 10**9 + 7 10**9 + 7 mod stdin = sys.stdin sys.stdin stdin ns = lambda: stdin.readline().rstrip() lambda: stdin.readline().rstrip() ns
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

s = ns()
n = len(s)
b = s.count('0')
r = n - b
print(2 * min(b, r))