import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  }
} import java.util.*; util.* java public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  }
} Main public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  } main { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int oneCnt = 0; oneCnt 0 int zeroCnt = 0; zeroCnt 0 for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++; char c s.toCharArray() s.toCharArray s if(c == '0') zeroCnt++;
        else oneCnt++; if(c == '0') zeroCnt++;
        else oneCnt++; c == '0' c '0' zeroCnt++ zeroCnt oneCnt++ oneCnt System.out.println(Math.min(zeroCnt, oneCnt) * 2) System.out.println System.out System System.out Math.min(zeroCnt, oneCnt) * 2 Math.min(zeroCnt, oneCnt) Math.min Math zeroCnt oneCnt 2 String[] args args public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  }
} public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  }
} Main
import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();

      int oneCnt = 0;
      int zeroCnt = 0;
      for(char c : s.toCharArray())
        if(c == '0') zeroCnt++;
        else oneCnt++;
      System.out.println(Math.min(zeroCnt, oneCnt) * 2);
  }
}