puts ("1000000007".length - gets.chomp.length).abs