In the sum $+1+3+9+27+81+243+729$, any addends can be crossed out and the signs before some of the remaining numbers can be changed from "+" to "-". Masha wants to use this method to first get an expression whose value is 1, then, starting over, get an expression whose value is 2, then (starting over again) get 3, and so on. What is the largest integer she will be able to achieve without skipping any numbers?
Every integer can be written as a sum of powers of three with coefficients 0, 1, and -1 instead of the usual 0, 1, and 2 (see problem 30840). Therefore, Masha will be able to get all integers from 1 to $1+3+9+27+81$ + $243+729=1093$

## Answer

Up to the number 1093 (inclusive).