Let n be the number you choose, 1 <= n <= 9. In step 2, you multiply n by 9, then 9n = (10 - 1) n = = 10 (n - 1) + (10 - n) = 10 a + b, where 0 <= a, b <= 9. Then a = n - 1, b = 10 - n. Adding a and b always results in a + b = ( n - 1 ) + (10 - n) = 9. Let x be the number of people you've kissed. Step 4~6 yields 9 * 3 + 5 - x = 32 - x. So, by subtracting the number you answered from 32, the adversary can know x, the number of people you've kissed.