I need a rule for the following table:

Input 0 1 2 3 4 5 Output 5 4 3 2 1

out = 5 - in

You need to extend your output by one number: 6 inputs, 5 outputs.