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