The emergency room that Mary works in took care of 517 patients last month. Her best friend Emma works in the emergency room across town, and they took care of 200 patients last month. How many patients were taken care of last month by both emergency rooms?