import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();
    int count0 = 0;
    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        count0++;
      }
    }
    int ans = count0 <= s.length() / 2 ? count0 : s.length() - count0;
    System.out.println(ans * 2);
  }

} import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();
    int count0 = 0;
    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        count0++;
      }
    }
    int ans = count0 <= s.length() / 2 ? count0 : s.length() - count0;
    System.out.println(ans * 2);
  }

} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();
    int count0 = 0;
    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        count0++;
      }
    }
    int ans = count0 <= s.length() / 2 ? count0 : s.length() - count0;
    System.out.println(ans * 2);
  } main {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();
    int count0 = 0;
    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        count0++;
      }
    }
    int ans = count0 <= s.length() / 2 ? count0 : s.length() - count0;
    System.out.println(ans * 2);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner int count0 = 0; count0 0 for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        count0++;
      }
    } 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') {
        count0++;
      }
    } {
      if (s.charAt(i) == '0') {
        count0++;
      }
    } if (s.charAt(i) == '0') {
        count0++;
      } s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' {
        count0++;
      } count0++ count0 int ans = count0 <= s.length() / 2 ? count0 : s.length() - count0; ans count0 <= s.length() / 2 ? count0 : s.length() - count0 count0 <= s.length() / 2 count0 s.length() / 2 s.length() s.length s 2 count0 s.length() - count0 s.length() s.length s count0 System.out.println(ans * 2) System.out.println System.out System System.out ans * 2 ans 2 String[] args args
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();
    int count0 = 0;
    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        count0++;
      }
    }
    int ans = count0 <= s.length() / 2 ? count0 : s.length() - count0;
    System.out.println(ans * 2);
  }

}
