How to write a formula for the input of a function.