let tadasii = "1000000007".filter{$0 == "0"}.count let inpt = readLine()!.filter{ $0 == "0" }.count let ans = abs(tadasii - inpt) print(ans)