import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util import java.util.Arrays; Arrays java.util public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







}
} Main public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







} main {
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count1 = 0; count1 0 int count2 = 0; count2 0 for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    } {
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    } if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        } s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' {
            count1++;
        } count1++ count1 {
            count2++;
        } count2++ count2 System.out.println(Math.min(count1, count2)*2) System.out.println System.out System System.out Math.min(count1, count2)*2 Math.min(count1, count2) Math.min Math count1 count2 2 final String[] args args public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







}
} public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    //final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    String s = sc.next();
    int count1 = 0;
    int count2 = 0;

    for(int i = 0; i < s.length(); i++){
        if(s.charAt(i) == '0'){
            count1++;
        }else{
            count2++;
        }
    }

    System.out.println(Math.min(count1, count2)*2);
    

    




    







}
}