import java.util.*;
import java.math.BigDecimal;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    }
} import java.util.*; util.* java import java.math.BigDecimal; BigDecimal java.math public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String h = sc.next(); h sc.next() sc.next sc String brock[] = h.split(""); brock h.split("") h.split h "" int iti = 0 iti 0 zero = 0; zero 0 for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        } int i = 0; int i = 0; i 0 i < h.length() i h.length() h.length h i++ i++ i {
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        } {
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        } if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          } brock[i].equals("1") brock[i].equals brock[i] brock i "1" {
            iti += 1;
          } iti += 1 iti 1 {
            zero += 1;
          } zero += 1 zero 1 if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        } iti <= zero iti zero {
          System.out.println(iti * 2);
        } System.out.println(iti * 2) System.out.println System.out System System.out iti * 2 iti 2 {
          System.out.println(zero * 2);
        } System.out.println(zero * 2) System.out.println System.out System System.out zero * 2 zero 2 String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    }
} Main
import java.util.*;
import java.math.BigDecimal;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String h = sc.next();
        String brock[] = h.split("");
        int iti = 0,zero = 0;
        for(int i = 0;i < h.length();i++){
          if(brock[i].equals("1")){
            iti += 1;
          }else{
            zero += 1;
          }
        }
        if(iti <= zero){
          System.out.println(iti * 2);
        }else{
          System.out.println(zero * 2);
        }

        
    }
}