import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    s = S()
    cnt0 = s.count("0")
    cnt1 = s.count("1")

    ans = min(cnt0, cnt1)*2
    print(ans)
main() import bisect,collections,copy,itertools,math,string bisect collections copy itertools math string import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS def main():
    s = S()
    cnt0 = s.count("0")
    cnt1 = s.count("1")

    ans = min(cnt0, cnt1)*2
    print(ans) main s = S() s S() S cnt0 = s.count("0") cnt0 s.count("0") s.count s count "0" cnt1 = s.count("1") cnt1 s.count("1") s.count s count "1" ans = min(cnt0, cnt1)*2 ans min(cnt0, cnt1)*2 min(cnt0, cnt1) min cnt0 cnt1 2 print(ans) print ans main() main def main():
    s = S()
    cnt0 = s.count("0")
    cnt1 = s.count("1")

    ans = min(cnt0, cnt1)*2
    print(ans) def main():
    s = S()
    cnt0 = s.count("0")
    cnt1 = s.count("1")

    ans = min(cnt0, cnt1)*2
    print(ans) main def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    s = S()
    cnt0 = s.count("0")
    cnt1 = s.count("1")

    ans = min(cnt0, cnt1)*2
    print(ans)
main()
