Sure:
max(1, switch(r,1,11,2,10,3,9,4,8,5,6,6,5,7,4,8,3,9,2,10,1,0) - (2 * nr))
Just subtract 2 for each rebuy (nr = number of rebuys), and then run it through max(), which returns the maximum of the values passed to it. Since 1 is one of the values, 1 will be returned if the rest of the formula ends up being 0 or less.