One line bash solutions: https://pastebin.com/QnKJEXxt
sum(map(lambda x: x // 3 - 2, numbers))numbers.sumBy { it / 3 - 2 }
Thus for Python 3 the new // operator was added for explicit floor division (which is often quite useful in its own right), leaving the / operator to always return an exact (to machine precision) floating point result, even with integer arguments.
cf. https://en.wikipedia.org/wiki/Principle_of_least_astonishmen...
input.map(&(-> (f) {->(g) {g.(g)}.(->(g) { f.(->(*args) {g.(g).(*args)})})}.(->(f) { ->(n) { n < 9 ? 0 : (n/3-2)+f.(n/3-2) } }))).reduce(&:+)