It seems like there's a typo? The x and y rows are identical
Assuming there is no typo, then the input and the output are the same. Meaning that whatever you plug in, is what comes out. If the output is 40, then the input must be 40.
So the answer is 40 (assuming there are no typos made by your textbook or teacher)