Try the following:
max(17-(r), 0)
This should provide the higher of the two variables, either 17 minus rank, or 0.
For 1st place, 17-1= 16 points
for 2nd place, 17-2= 15 points
for 3rd place, 17-3= 14 points
...
...
for 16th place, 17-16= 1 point
for 17th place, 17-17= 0 points
for 18th place, 17-18= -1, in which the equation will award 0 points instead because 0 is greater than -1.
...
...
for 48th place, 17-48= -31, in which the equation will award 0 points instead because 0 is greater than -31.
This should work for what you need.