  We obtain exact densities of contractible and non-contractible loops in the
O(1) model on a strip of the square lattice rolled into an infinite cylinder of
finite even circumference $L$. They are also equal to the densities of critical
percolation clusters on forty five degree rotated square lattice rolled into a
cylinder, which do not or do wrap around the cylinder respectively. The results
are presented as explicit rational functions of $L$ taking rational values for
any even $L$. Their asymptotic expansions in the large $L$ limit have
irrational coefficients reproducing the earlier results in the leading orders.
The solution is based on a mapping to the six-vertex model and the use of
technique of Baxter's T-Q equation.
