Jill asks each of her classmates to choose a number....HELP!!

I'm taking a math theory class and am in over my head. I'm making it but am completely stumped by this question. "Jill asks each of her classmates to choose a number, then multiply the number by -3, add 2 to the product, multiply the result by -2, and then subtract 14. Finally, each student is asked to divide the result by 6 and record the answer. When Jill gets their answers, she adds 3 to it in her head and announces the number that classmate originally chose. How did Jill know to add 3 to ach answer?"

Totally frustrated!! Can anyone help?

Re: Jill asks each of her classmates to choose a number....HELP!!

Let the number the classmate chooses be n.

Following through the specified transformations we get n -> -3n -> -3n + 2 -> 6n-4 -> 6n - 18 -> n-3

Adding 3 to n-3 gives n, the original number.