# [Red], 41 bytes func[ø][a: 0 foreach ¼ ø[a: a + ¼]a]; [Try it online!][TIO-kmoxf3rh] [Red]: http://www.red-lang.org [TIO-kmoxf3rh]: https://tio.run/##K0pN@R@UmhIdy5Vm9T@tNC85@vCO2OhEKwUDhbT8otTE5AyFQ3sUDu8ACSUqaAM5sYmx1v8LijLzShTSFJSI1qLEBdFjaG5kqaClYPQfAA "Red – Try It Online" 2 x 1729