import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*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 n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*2);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*2);
    
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*2);
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s int aka = 0; aka 0 int ao = 0; ao 0 for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    } int i = 0 ; int i = 0 ; i 0 i < n i n ++i ++i i {
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    } {
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    } if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      } s.charAt(i)=='0' s.charAt(i) s.charAt s i '0' {
        aka++;
      } aka++ aka {
        ao++;
      } ao++ ao int ju = Math.min(aka,ao); ju Math.min(aka,ao) Math.min Math aka ao System.out.println(ju*2) System.out.println System.out System System.out ju*2 ju 2 String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*2);
    
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*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 n = s.length();
    int aka = 0;
    int ao = 0;
    
    for(int i = 0 ; i < n ; ++i){
      if(s.charAt(i)=='0'){
        aka++;
      }else{
        ao++;
      }
    }
    
    int ju = Math.min(aka,ao);
    System.out.println(ju*2);
    
  }
}
