import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  }
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  } main {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str  = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc int one = 0 one 0 zero = 0; zero 0 for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    } {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    } if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      } str.charAt(i) == '0' str.charAt(i) str.charAt str i '0' {
        zero++;
      } zero++ zero {
        one++;
      } one++ one System.out.println(2 * Math.min(one, zero)) System.out.println System.out System System.out 2 * Math.min(one, zero) 2 Math.min(one, zero) Math.min Math one zero String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  }
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str  = sc.next();
    sc.close();
    int one = 0, zero = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str.charAt(i) == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(2 * Math.min(one, zero));
  }
}