import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   int N = S.length();

   int count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 }
} import java.util.Scanner; Scanner 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 count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   int N = S.length();

   int count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 } main {
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   int N = S.length();

   int count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 } 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 count =0; count 0 for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   } int i =0; int i =0; i 0 i<N i N i++ i++ i {
    if(S.charAt(i)=='0') count++;
   } {
    if(S.charAt(i)=='0') count++;
   } if(S.charAt(i)=='0') count++; S.charAt(i)=='0' S.charAt(i) S.charAt S i '0' count++ count if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count)); N-2*count>0 N-2*count N 2*count 2 count 0 System.out.println(2*count) System.out.println System.out System System.out 2*count 2 count System.out.println(2*(N-count)) System.out.println System.out System System.out 2*(N-count) 2 (N-count) N count 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 count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   int N = S.length();

   int count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 }
} Main
import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   int N = S.length();

   int count =0;
   for(int i =0;i<N;i++)
   {
    if(S.charAt(i)=='0') count++;
   }
   if(N-2*count>0) System.out.println(2*count);
   else System.out.println(2*(N-count));
 }
}