import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		sC();
	}

	void sC() {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} import java.util.*; util.* java public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		sC();
	}

	void sC() {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) void doIt() {
		sC();
	} doIt {
		sC();
	} sC() sC void sC() {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	} sC {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	} String s = sc.next(); s sc.next() sc.next sc int zero = 0 zero 0 one = 0; one 0 char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			if(c[i] == '0') zero++;
			else one++;
		} {
			if(c[i] == '0') zero++;
			else one++;
		} if(c[i] == '0') zero++;
			else one++; c[i] == '0' c[i] c i '0' zero++ zero one++ one if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2); one > zero one zero {
			System.out.println(zero * 2);
		} System.out.println(zero * 2) System.out.println System.out System System.out zero * 2 zero 2 System.out.println(one * 2) System.out.println System.out System System.out one * 2 one 2 public static void main(String[] args) {
		new Main().doIt();
	} main {
		new Main().doIt();
	} new Main().doIt() new Main().doIt new Main() String[] args args public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		sC();
	}

	void sC() {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		sC();
	}

	void sC() {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main
import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);

	void doIt() {
		sC();
	}

	void sC() {
		String s = sc.next();
		int zero = 0, one = 0;
		char c[] = s.toCharArray();
		for(int i = 0; i < c.length; i++) {
			if(c[i] == '0') zero++;
			else one++;
		}
		if(one > zero) {
			System.out.println(zero * 2);
		}
		else System.out.println(one * 2);
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
}
