n = readline() p = count('0', n) - count('0', "1000000007") println(abs(p))