Input 4 21 36 38 56

Output 57 40 25 23 5
what is the rule?

Try to add the input and the output value for different cases, and see if you can discover the rule.