# -*- coding: utf-8 -*-

s = list(eval(input()))



ans = min(s.count('0'), s.count('1'))

print((ans * 2))

# -*- coding: utf-8 -*-

s = eval(input())



ans = 2 * (min(s.count('0'), s.count('1')))

print(ans)

# -*- coding: utf-8 -*-
s = list(eval(input()))
ans = min(s.count("0"), s.count("1"))
print((ans * 2))

# -*- coding: utf-8 -*-
s = eval(input())
ans = 2 * (min(s.count("0"), s.count("1")))
print(ans)

-s = list(eval(input())) -ans = min(s.count("0"), s.count("1")) -print((ans * 2)) +s = eval(input()) +ans = 2 * (min(s.count("0"), s.count("1"))) +print(ans)