dial = 50
puts ARGF.count { (dial += _1[1..].to_i * (_1 <=> ?M)) % 100 == 0 }
