work out the output when the input is 6