Just do it in dollars. Ideally, you want your total dollar value hedged, or paired, in this case.
MRK is trading at 49.24. So, for 1000 shares, you have $49,240. Now take the $49,240 and divide it by $58.05 or the price of LLY, and you get 851 shares.
So, you can trade 1000:851 or...