import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    }

} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    } main {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String temp = sc.nextLine(); temp sc.nextLine() sc.nextLine sc String[] tempArr = temp.split(""); tempArr temp.split("") temp.split temp "" int cnt1 = 0 cnt1 0 cnt2 = 0; cnt2 0 for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        } String str tempArr {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        } {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        } if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            } str.equals("0") str.equals str "0" {
                cnt1++;
            } cnt1++ cnt1 {
                cnt2++;
            } cnt2++ cnt2 System.out.println(Math.min(cnt1,cnt2) * 2) System.out.println System.out System System.out Math.min(cnt1,cnt2) * 2 Math.min(cnt1,cnt2) Math.min Math cnt1 cnt2 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    }

} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        String temp = sc.nextLine();
        String[] tempArr = temp.split("");
        int cnt1 = 0,cnt2 = 0;
        for(String str : tempArr) {
            if (str.equals("0")) {
                cnt1++;
            }else {
                cnt2++;
            }
        }

        System.out.println(Math.min(cnt1,cnt2) * 2);


    }

}
