def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import fractions
import copy
from itertools import permutations
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

from itertools import permutations
from math import factorial, hypot

# 結局最後には0の塊か1の塊が残る
S = list(map(int, list(input())))
zerocounter = 0
onecounter = 0
for st in S:
    if st == 0:
        zerocounter += 1
    else:
        onecounter += 1
print(min(zerocounter, onecounter) * 2) def getN():
    return int(input()) getN return int(input()) int(input()) int input() input def getNM():
    return map(int, input().split()) getNM return map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split def getList():
    return list(map(int, input().split())) getList return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def getArray(intn):
    return [int(input()) for i in range(intn)] getArray int(input()) for i in range(intn) for i in range(intn) i range(intn) range intn for i in range(intn) int(input()) int input() input return [int(input()) for i in range(intn)] [int(input()) for i in range(intn)] intn intn def input():
    return sys.stdin.readline().rstrip() input return sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip from collections import defaultdict, deque, Counter from sys import exit import heapq heapq import math math import fractions fractions import copy copy from itertools import permutations from operator import mul from functools import reduce from bisect import bisect_left, bisect_right import sys sys sys.setrecursionlimit(1000000000) sys.setrecursionlimit sys setrecursionlimit 1000000000 mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 from itertools import permutations from math import factorial, hypot S = list(map(int, list(input()))) S list(map(int, list(input()))) list map(int, list(input())) map int list(input()) list input() input zerocounter = 0 zerocounter 0 onecounter = 0 onecounter 0 for st in S:
    if st == 0:
        zerocounter += 1
    else:
        onecounter += 1 st S if st == 0:
        zerocounter += 1
    else:
        onecounter += 1 st == 0 st 0 zerocounter += 1 zerocounter 1 onecounter += 1 onecounter 1 print(min(zerocounter, onecounter) * 2) print min(zerocounter, onecounter) * 2 min(zerocounter, onecounter) min zerocounter onecounter 2 zerocounter += 1 1 zerocounter mod = 10 ** 9 + 7 10 ** 9 + 7 mod def getNM():
    return map(int, input().split()) def getNM():
    return map(int, input().split()) getNM def input():
    return sys.stdin.readline().rstrip() def input():
    return sys.stdin.readline().rstrip() input S = list(map(int, list(input()))) list(map(int, list(input()))) S def getList():
    return list(map(int, input().split())) def getList():
    return list(map(int, input().split())) getList def getN():
    return int(input()) def getN():
    return int(input()) getN onecounter = 0 0 onecounter onecounter += 1 1 onecounter zerocounter = 0 0 zerocounter def getArray(intn):
    return [int(input()) for i in range(intn)] def getArray(intn):
    return [int(input()) for i in range(intn)] getArray
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import fractions
import copy
from itertools import permutations
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

from itertools import permutations
from math import factorial, hypot

# 結局最後には0の塊か1の塊が残る
S = list(map(int, list(input())))
zerocounter = 0
onecounter = 0
for st in S:
    if st == 0:
        zerocounter += 1
    else:
        onecounter += 1
print(min(zerocounter, onecounter) * 2)