Solution:
Answer: 47
We claim that player 1 has a winning strategy if and only if N is even and not an odd power of 2.
First we show that if you are stuck with an odd number, then you are guaranteed to lose. Suppose you have an odd number ab, where a and b are odd numbers, and you choose to subtract a. You pass your opponent the number a(b−1). This cannot be a power of 2 (otherwise a is a power of 2 and hence a=1, which is not allowed), so your opponent can find an odd proper divisor of a(b−1) (such as a), and you will have a smaller odd number. Eventually you will get to an odd prime and lose.
Now consider even numbers that aren't powers of 2. As with before, you can find an odd proper divisor of N and pass your opponent an odd number, so you are guaranteed to win.
Finally consider powers of 2. If you have the number N=2k, it would be unwise to choose a proper divisor other than 2k−1; otherwise you would give your opponent an even number that isn't a power of 2. Therefore if k is odd, you will end up with 2 and lose. If k is even, though, your opponent will end up with 2 and you will win.
Therefore player 1 has a winning strategy for all even numbers except for odd powers of 2.