Idk why you would need this but this equations lets you figure out how much it would cost you "A" to reroll "R" times: A = 12.5R^2 + 12.5R . I just used simple integral rules to find it :)