import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.util.Comparator.*;

public class Main {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    }
}
class Solver {
	Scanner sc;
	PrintWriter out;
    public Solver(InputStream in, PrintWriter out) {
    	sc = new Scanner(in);
    	this.out = out;
    }
    // ======================================================================
    public void solve() {
    	char[] C = ns().toCharArray();
    	int b = 0, r = 0;
    	for (int i = 0; i < C.length; i++) {
			if(C[i] == '0')		r++;
			else				b++;
		}
    	out.println(r >= b ? b*2 : r*2);
    }
    // ------------------------------------------
    // 入力
    // ------------------------------------------
    public int ni() {
    	return sc.nextInt();
    }
    public long nl() {
    	return sc.nextLong();
    }
    public String ns() {
    	return sc.next();
    }
    public char[] nc() {
    	return sc.next().toCharArray();
    }
    public int[] ndi(int N) {
    	int[] ans = new int[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ni();
		}
    	return ans;
    }
    public long[] ndl(int N) {
    	long[] ans = new long[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = nl();
		}
    	return ans;
    }
    public String[] nds(int N) {
    	String[] ans = new String[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ns();
		}
    	return ans;
    }
    public char[][] ndc(int N) {
    	char[][] ans = new char[N][];
    	for (int i = 0; i < N; i++) {
			ans[i] = nc();
		}
    	return ans;
    }
    public int[][] nddi(int N, int S) {
    	int[][] ans = new int[N][S];
    	for (int i = 0; i < N; i++) {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		}
    	return ans;
    }
} import java.io.BufferedWriter; BufferedWriter java.io import java.io.FileWriter; FileWriter java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.lang.reflect.Array; Array java.lang.reflect import java.math.BigDecimal; BigDecimal java.math import java.math.MathContext; MathContext java.math import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.Objects; Objects java.util import java.util.PriorityQueue; PriorityQueue java.util import java.util.Queue; Queue java.util import java.util.Random; Random java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util import java.util.Stack; Stack java.util import java.util.TreeMap; TreeMap java.util import java.util.TreeSet; TreeSet java.util import static java.util.Comparator.*; import static java.util.Comparator.*; import static java.util.Comparator.*; public class Main {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    }
} Main public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    } main {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    } PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) Solver solver = new Solver(System.in, out); solver new Solver(System.in, out) solver.solve() solver.solve solver out.close() out.close out String[] args args class Solver {
	Scanner sc;
	PrintWriter out;
    public Solver(InputStream in, PrintWriter out) {
    	sc = new Scanner(in);
    	this.out = out;
    }
    // ======================================================================
    public void solve() {
    	char[] C = ns().toCharArray();
    	int b = 0, r = 0;
    	for (int i = 0; i < C.length; i++) {
			if(C[i] == '0')		r++;
			else				b++;
		}
    	out.println(r >= b ? b*2 : r*2);
    }
    // ------------------------------------------
    // 入力
    // ------------------------------------------
    public int ni() {
    	return sc.nextInt();
    }
    public long nl() {
    	return sc.nextLong();
    }
    public String ns() {
    	return sc.next();
    }
    public char[] nc() {
    	return sc.next().toCharArray();
    }
    public int[] ndi(int N) {
    	int[] ans = new int[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ni();
		}
    	return ans;
    }
    public long[] ndl(int N) {
    	long[] ans = new long[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = nl();
		}
    	return ans;
    }
    public String[] nds(int N) {
    	String[] ans = new String[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ns();
		}
    	return ans;
    }
    public char[][] ndc(int N) {
    	char[][] ans = new char[N][];
    	for (int i = 0; i < N; i++) {
			ans[i] = nc();
		}
    	return ans;
    }
    public int[][] nddi(int N, int S) {
    	int[][] ans = new int[N][S];
    	for (int i = 0; i < N; i++) {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		}
    	return ans;
    }
} Solver Scanner sc; sc PrintWriter out; out public Solver(InputStream in, PrintWriter out) {
    	sc = new Scanner(in);
    	this.out = out;
    } Solver {
    	sc = new Scanner(in);
    	this.out = out;
    } sc = new Scanner(in) sc new Scanner(in) this.out = out this.out this this.out out InputStream in in PrintWriter out out // ======================================================================
    public void solve() {
    	char[] C = ns().toCharArray();
    	int b = 0, r = 0;
    	for (int i = 0; i < C.length; i++) {
			if(C[i] == '0')		r++;
			else				b++;
		}
    	out.println(r >= b ? b*2 : r*2);
    } solve {
    	char[] C = ns().toCharArray();
    	int b = 0, r = 0;
    	for (int i = 0; i < C.length; i++) {
			if(C[i] == '0')		r++;
			else				b++;
		}
    	out.println(r >= b ? b*2 : r*2);
    } char[] C = ns().toCharArray(); C ns().toCharArray() ns().toCharArray ns() ns int b = 0 b 0 r = 0; r 0 for (int i = 0; i < C.length; i++) {
			if(C[i] == '0')		r++;
			else				b++;
		} int i = 0; int i = 0; i 0 i < C.length i C.length C C.length i++ i++ i {
			if(C[i] == '0')		r++;
			else				b++;
		} {
			if(C[i] == '0')		r++;
			else				b++;
		} if(C[i] == '0')		r++;
			else				b++; C[i] == '0' C[i] C i '0' r++ r b++ b out.println(r >= b ? b*2 : r*2) out.println out r >= b ? b*2 : r*2 r >= b r b b*2 b 2 r*2 r 2 // ------------------------------------------
    // 入力
    // ------------------------------------------
    public int ni() {
    	return sc.nextInt();
    } ni {
    	return sc.nextInt();
    } return sc.nextInt(); sc.nextInt() sc.nextInt sc public long nl() {
    	return sc.nextLong();
    } nl {
    	return sc.nextLong();
    } return sc.nextLong(); sc.nextLong() sc.nextLong sc public String ns() {
    	return sc.next();
    } ns {
    	return sc.next();
    } return sc.next(); sc.next() sc.next sc public char[] nc() {
    	return sc.next().toCharArray();
    } nc {
    	return sc.next().toCharArray();
    } return sc.next().toCharArray(); sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc public int[] ndi(int N) {
    	int[] ans = new int[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ni();
		}
    	return ans;
    } ndi {
    	int[] ans = new int[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ni();
		}
    	return ans;
    } int[] ans = new int[N]; ans new int[N] N for (int i = 0; i < N; i++) {
			ans[i] = ni();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans[i] = ni();
		} {
			ans[i] = ni();
		} ans[i] = ni() ans[i] ans i ni() ni return ans; ans int N N public long[] ndl(int N) {
    	long[] ans = new long[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = nl();
		}
    	return ans;
    } ndl {
    	long[] ans = new long[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = nl();
		}
    	return ans;
    } long[] ans = new long[N]; ans new long[N] N for (int i = 0; i < N; i++) {
			ans[i] = nl();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans[i] = nl();
		} {
			ans[i] = nl();
		} ans[i] = nl() ans[i] ans i nl() nl return ans; ans int N N public String[] nds(int N) {
    	String[] ans = new String[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ns();
		}
    	return ans;
    } nds {
    	String[] ans = new String[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ns();
		}
    	return ans;
    } String[] ans = new String[N]; ans new String[N] N for (int i = 0; i < N; i++) {
			ans[i] = ns();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans[i] = ns();
		} {
			ans[i] = ns();
		} ans[i] = ns() ans[i] ans i ns() ns return ans; ans int N N public char[][] ndc(int N) {
    	char[][] ans = new char[N][];
    	for (int i = 0; i < N; i++) {
			ans[i] = nc();
		}
    	return ans;
    } ndc {
    	char[][] ans = new char[N][];
    	for (int i = 0; i < N; i++) {
			ans[i] = nc();
		}
    	return ans;
    } char[][] ans = new char[N][]; ans new char[N][] N for (int i = 0; i < N; i++) {
			ans[i] = nc();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans[i] = nc();
		} {
			ans[i] = nc();
		} ans[i] = nc() ans[i] ans i nc() nc return ans; ans int N N public int[][] nddi(int N, int S) {
    	int[][] ans = new int[N][S];
    	for (int i = 0; i < N; i++) {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		}
    	return ans;
    } nddi {
    	int[][] ans = new int[N][S];
    	for (int i = 0; i < N; i++) {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		}
    	return ans;
    } int[][] ans = new int[N][S]; ans new int[N][S] N S for (int i = 0; i < N; i++) {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		} {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		} for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			} int j = 0; int j = 0; j 0 j < S j S j++ j++ j {
				ans[i][j] = ni();
			} {
				ans[i][j] = ni();
			} ans[i][j] = ni() ans[i][j] ans[i] ans i j ni() ni return ans; ans int N N int S S public class Main {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    }
} public class Main {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    }
} Main
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.util.Comparator.*;

public class Main {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        Solver solver = new Solver(System.in, out);
        solver.solve();
        out.close();
    }
}
class Solver {
	Scanner sc;
	PrintWriter out;
    public Solver(InputStream in, PrintWriter out) {
    	sc = new Scanner(in);
    	this.out = out;
    }
    // ======================================================================
    public void solve() {
    	char[] C = ns().toCharArray();
    	int b = 0, r = 0;
    	for (int i = 0; i < C.length; i++) {
			if(C[i] == '0')		r++;
			else				b++;
		}
    	out.println(r >= b ? b*2 : r*2);
    }
    // ------------------------------------------
    // 入力
    // ------------------------------------------
    public int ni() {
    	return sc.nextInt();
    }
    public long nl() {
    	return sc.nextLong();
    }
    public String ns() {
    	return sc.next();
    }
    public char[] nc() {
    	return sc.next().toCharArray();
    }
    public int[] ndi(int N) {
    	int[] ans = new int[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ni();
		}
    	return ans;
    }
    public long[] ndl(int N) {
    	long[] ans = new long[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = nl();
		}
    	return ans;
    }
    public String[] nds(int N) {
    	String[] ans = new String[N];
    	for (int i = 0; i < N; i++) {
			ans[i] = ns();
		}
    	return ans;
    }
    public char[][] ndc(int N) {
    	char[][] ans = new char[N][];
    	for (int i = 0; i < N; i++) {
			ans[i] = nc();
		}
    	return ans;
    }
    public int[][] nddi(int N, int S) {
    	int[][] ans = new int[N][S];
    	for (int i = 0; i < N; i++) {
			for (int j = 0; j < S; j++) {
				ans[i][j] = ni();
			}
		}
    	return ans;
    }
}
