Critical temperature of superconductor/ferromagnet bilayers