# For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations


def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


s = input()
r = b = 0
for i in s:
    if i == '1':
        b += 1
    else:
        r += 1
print(min(r, b)*2) import math math from decimal import Decimal from itertools import permutations def inp():
    return(int(input()))


# For taking List inputs. inp return(int(input())) int(input()) int input() input def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable. inlist return(list(map(int, input().split()))) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs. instr s = input() s input() input return(list(s[:len(s)])) list(s[:len(s)]) list s[:len(s)] s :len(s) len(s) len s def invr():
    return(map(int, input().split())) invr return(map(int, input().split())) map(int, input().split()) map int input().split() ().split () input split s = input() s input() input r = b = 0 r 0 = b = 0 b 0 for i in s:
    if i == '1':
        b += 1
    else:
        r += 1 i s if i == '1':
        b += 1
    else:
        r += 1 i == '1' i '1' b += 1 b 1 r += 1 r 1 print(min(r, b)*2) print min(r, b)*2 min(r, b) min r b 2 def invr():
    return(map(int, input().split())) def invr():
    return(map(int, input().split())) invr b = 0 0 b b += 1 1 b s = input() input() s def inp():
    return(int(input()))


# For taking List inputs. def inp():
    return(int(input()))


# For taking List inputs. inp r = b = 0 0 r r += 1 1 r def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable. def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable. inlist def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs. def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs. instr
# For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations


def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


s = input()
r = b = 0
for i in s:
    if i == '1':
        b += 1
    else:
        r += 1
print(min(r, b)*2)
