Suppose a firm has production function $Q = 4KL$, $MP_L = 4K$ and $MP_K = 4L$. Also suppose that the wage, w, is 10 and that the rental rate of capital, r, is 20. The firm is producing 512 units of output. What is the total cost when the firm is minimizing its cost and producing this amount of output?