To process a batch of parts, if the master processes the parts first for 20 days, the apprentice will process the rest in 30 days; if the apprentice processes the parts in 37 days first, the master will process the rest in 17 days. Now the master and apprentice work together for a few days, and the rest will be processed by the apprentice for another 40 days to complete. Question: How many days did the master and apprentice work together?
加工一批零件，如果师傅先加工20天后，剩下的由徒弟再加工30天正好完成；如果徒弟先加工37天，剩下的由师傅再加工17天也正好完成．现在师傅、徒弟一起加工若干天后，剩下的由徒弟再加工40天正好完成．问：师傅和徒弟一起加工了多少天．
<result>11</result>