Optimal Trade-Off Between Economic Activity and Health During an Epidemic