import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static final long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = 0, B = 0; for(final char c : sc.next().toCharArray()){ if(c == '0'){ A++; } } for(final char c : "1000000007".toCharArray()){ if(c == '0'){ B++; } } System.out.println(Math.abs(A - B)); } }