d=gets.to_i s=Array.new(2){gets.chomp}.inject{|s, t| s+t} d.times{s='x'+s+'x'} s=s.chars.each.map{|c| c=='x' ? 0 : 1} mx=0 (s.size-d).times do |i| next unless s[i...i+d].inject(:+).zero? for j in i...i+d do s[j]^=1 end l, r, cnt=0, 0, 0 while r