package main

import "fmt"

func main() {
	var line string
	_, _ = fmt.Scan(&line)
	count := 0
	for i := 0; i < len(line) - 1; i++ {
		j := i + 2
		sub := line[i:j]
		if sub == "01" || sub == "10" {
			line = line[:i] + line[j:]
			count++
			i = -1
		}
	}
	fmt.Println(count * 2)
}
