$\triangle ABC$ is isosceles with legs $AC=BC=b$ and angle $\measuredangle ACB=\gamma$. Let $CD$ and $BM$ be altitudes that intersect at $H$. Find $MD$.
I have been struggling with this problem for an hour now. I really don't know how to start. I was thinking about using cosine or sine rule, but it seems useless at the end. For example $$AB^2=AC^2+BC^2-2\cdot AC\cdot BC\cdot \cos\gamma=2b^2-2b^2\cos\gamma$$