On a Zolotarev problem in the method of alternating directions