I tired with different numbers and it seems to return the maximum number in all cases. No idea how to solve it