import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
void main()
{
    string s;
    scan(s);
    // writeln(s[0]);
    long x;
    long y;
    foreach (i; 0 .. s.length)
    {
        if (s[i] == '0')
        {
            x += 1;
        }
        else if (s[i] == '1')
        {
            y += 1;
        }
    }
    writeln(2 * (min(x, y)));
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
