Solve problem 11 using Lua.