Data-driven predictive models are increasingly used to inform decisions that hold important consequences for individuals and society. As a result, decision makers are often obliged, even legally required, to provide explanations about their decisions. In this context, it has been increasingly argued that these explanations should help individuals understand what would have to change for these decisions to be beneficial ones. However, there has been little discussion on the possibility that individuals may use the above counterfactual explanations to invest effort strategically in order to maximize their chances of receiving a beneficial decision. In this paper, our goal is to find policies and counterfactual explanations that are optimal in terms of utility in such a strategic setting. To this end, we first show that, given a pre-defined policy, the problem of finding the optimal set of counterfactual explanations is NP-hard. However, we further show that the corresponding objective is nondecreasing and satisfies submodularity. Therefore, a standard greedy algorithm offers an approximation factor of $(1-1/e)$ at solving the problem. Additionally, we also show that the problem of jointly finding both the optimal policy and set of counterfactual explanations reduces to maximizing a non-monotone submodular function. As a result, we can use a recent randomized algorithm to solve the problem, which offers an approximation factor of $1/e$. Finally, we illustrate our theoretical findings by performing experiments on synthetic and real lending data.