If there is more than one element in any stack then the first player can choose to take the whole stack, or leave one element. Think about the difference and you should be able to solve this problem.
I also think that if a stack has more than one element, we can consider it has 2 elements. I call A is the number of stack has more than 1 element and B is the number of stack has 1 element. But I dont know where i am wrong?
Thank you. I have got ac now...actually I didn't understand the problem. I thought a player can take only one object. But it is wrong. It is possible to take any number of object. Thanks to maccy who opened my eyes. I was a fool.