Not terribly obvious but pretty simple – here’s the upshot: