Solve problem 44 using Lua.