r=0 (gets.chomp+gets+'$').chars.inject(0){|s,e|r=[s,r].max;e=='o' ? s+1 : 0} p r