Option Infer On
Imports System

Module Program
    Sub Main(args As String())
        Dim x = Console.ReadLine()

        Dim s = x.Replace("1", "").Length
        Dim t = x.Replace("0", "").Length
        Dim u = x.Length
        Console.WriteLine(u - Math.Abs(s - t))

    End Sub
End Module