days = (gets.chomp+gets.chomp).split(/x+/).map(&:length) i = 0 yesbig=0 while big = days[i] do if yesbig < big && yesbig = big then end i+=1 end puts(yesbig)