
import java.util.Scanner;

public class Main{
	
 public static void main(String[] args) {
	 Scanner sc=new Scanner(System.in);
	 String S=sc.next();
	 int A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 }
	


} 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 A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 }
	


} Main public static void main(String[] args) {
	 Scanner sc=new Scanner(System.in);
	 String S=sc.next();
	 int A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 } main {
	 Scanner sc=new Scanner(System.in);
	 String S=sc.next();
	 int A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String S=sc.next(); S sc.next() sc.next sc int A=0; A 0 int B=0; B 0 char[] c=S.toCharArray(); c S.toCharArray() S.toCharArray S for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 } {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 } if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 } c[i]=='1' c[i] c i '1' {
			 A++;
		 } A++ A {
			 B++;
		 } B++ B System.out.println(2*Math.min(A,B)) System.out.println System.out System System.out 2*Math.min(A,B) 2 Math.min(A,B) Math.min Math A B String[] args args public class Main{
	
 public static void main(String[] args) {
	 Scanner sc=new Scanner(System.in);
	 String S=sc.next();
	 int A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 }
	


} public class Main{
	
 public static void main(String[] args) {
	 Scanner sc=new Scanner(System.in);
	 String S=sc.next();
	 int A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 }
	


} 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 A=0;
	 int B=0;
	 char[] c=S.toCharArray();
	 for(int i=0;i<S.length();i++) {
		 if(c[i]=='1') {
			 A++;
		 }else {
			 B++;
		 }
	 }
	 
	 System.out.println(2*Math.min(A,B));
 }
	


}