The mad function machine

The mad function machine maths puzzle by St. Albans Tuition

EACH INPUT FOLLOWS THE SAME RULE FOR EACH OUPTUT OF THE FUNCTION MACHINE

CAN YOU WORK OUT THE RULE?

Maths puzzle table