Constrained optimization problem : Cost minimisation

Hi, I have this problem:

To produce one unit of a good a manufacturer needs m units of materials that

cost r per unit. An unskilled worker can be hired at an hourly rate of w1 and

would need 10 hours to produce one unit of output. A skilled worker can be

hired for an hourly rate of w2 and is five times as productive as an unskilled

worker. Let Li, i = 1, 2 denote the number of hours worked by a low and

high skilled worker respectively, and let K denote the amount of material used.

Write down the production function that represents this technology and derive

the corresponding cost function.

I think that the production function should look like this

f(L1,L2,K) = (L1/10+L2/2)*K/m

(since both labour and materials are needed to produce one unit)

The minimisation problem is thus:

min C = w1*L1+w2*L2+r*K subject to f(L1,L2,K) = y

I used the Lagrange method but i can't manage to find the values for L1,L2 and K. Have i made a mistake in the above analysis or have i just made a mistake in the simultaneous equations.?

Thanks

IMPORTANT EDIT: If we assume that an exact ratio of labour and capital is needed then the production function would take the form f(L1,L2,K) = min( L1/10 + L2/2 ; K/m) ... How can I differentiate this??