// ProblemURL : https://atcoder.jp/contests/abc120/tasks/abc120_c
// ---------------------------------------------
package main

import "fmt"

func smaller(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	var s string
	fmt.Scan(&s)

	sta0 := 0
	sta1 := 0
	ct := 0
	for i := range s {
		if s[i] == '0' {
			if sta1 > 0 {
				ct++
				sta0--
			} else {
				sta0++
			}
		} else {
			if sta0 > 0 {
				ct++
				sta0--
			} else {
				sta1++
			}
		}
	}

	fmt.Println(ct * 2)
}
