
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  }

} import java.io.FileNotFoundException; FileNotFoundException java.io import java.io.FileReader; FileReader java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  }

} Main public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  } main {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) String in = cin.next(); in cin.next() cin.next cin char[] temp = in.toCharArray(); temp in.toCharArray() in.toCharArray in int count = 0; count 0 for (char a : temp) {

      if (a == '0') count++;

    } char a temp {

      if (a == '0') count++;

    } {

      if (a == '0') count++;

    } if (a == '0') count++; a == '0' a '0' count++ count int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2; res in.length() - count >= count ? count * 2 : (in.length() - count) * 2 in.length() - count >= count in.length() - count in.length() in.length in count count count * 2 count 2 (in.length() - count) * 2 (in.length() - count) in.length() in.length in count 2 System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  }

} public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  }

} Main

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);

    String in = cin.next();
    char[] temp = in.toCharArray();
    int count = 0;

    for (char a : temp) {

      if (a == '0') count++;

    }

    int res = in.length() - count >= count ? count * 2 : (in.length() - count) * 2;

    System.out.println(res);


  }

}
