a = b = 0 while 1 c = a + b if (/.*31337.*/.match("#{c}")) print "#{c}\n" exit end if a == 0 && b == a a = 1 end b = a a = c c = a + b end