Hi, could anyone help me with understanding this please?

"A crate of mass 30kg is at rest on a slope which is at 18 degrees to the horizontal. Find the frictional force."

The frictional force = 30gcos(72 degrees)

I don't understand this because cos(72 degrees)= adjacent/hypotenuse, so cos(72 degrees)=30g/frictional force

which means that the frictional force=30g/cos(72 degrees)

Thanks in advance