let zeroCount (str:string) = str.ToCharArray() |> Array.where(fun c -> c = '0') |> Array.length let roleModel = "1000000007" let roleModel'sZeroCnt = roleModel |> zeroCount let N = stdin.ReadLine() let N'sZeroCnt = N |> zeroCount abs(roleModel'sZeroCnt - N'sZeroCnt) |> printfn "%i"