import strutils, math let M = "1_000_000_007".parseInt.repr N = stdin.readLine echo (M.len - N.len).abs