Let $ f_1, f_2, … f_m : {0, …, m } rightarrow mathbb Z $

my task is to find an algorithm that find a series of numbers $ x_1, x_2, …, x_m in { 0, …, m } $ that maximise $ sum_{i=1}^m f_i(x_i) $ and subjects to $ sum_i^m x_i le m $

To be honest I can’t really wrap my head around this problem. Any suggestions on ways to look at this problem differently?