Answer
$ 11.8\;\rm N\cdot m$
Work Step by Step
We know that the net torque exerted on the beam at the pin (or at any point) is zero since the beam is in equilibrium.
Thus,
$$\sum \tau_{\rm around\;pin}=\tau_{pin}-Mgx_{rod}-mgx_{weight}=0$$
where $M$ is the mass of the rod, and $m$ is the mass of the hnging weight.
We chose counterclockwise to be the positive direction. Hence, the two masses are exerting a negative torque.
$$\tau_{pin}=Mgx_{rod}+mgx_{weight}$$
Plugging the known;
$$\tau_{pin}=2\times 9.8\times(0.4) +0.5\times 9.8 (0.8)$$
$$\tau_{pin} =\color{red}{\bf 11.8}\;\rm N\cdot m$$