#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18

S = raw_input()
cnt1 = cnt2 = 0
for c in S:
    if c == '0':
        cnt1 += 1
    else:
        cnt2 += 1

print min(cnt1, cnt2) * 2

exit()

A, B, K = map(int, raw_input().split())

cnt = 0

for i in range(1, 200):
    if A % i == 0 and B % i == 0:
        cnt += 1
    if cnt == K:
        print i
        exit()