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