A two-player game is played with two piles of stones, with sizes m,n. On a player's turn, that player can remove any positive integer number of stones from one pile, or the same positive integer number of stones from each pile. A player loses when they are unable to take a stone. If 1≤m,n≤30, for how many of the 30×30=900 starting positions does the first player have a winning strategy?

878