Upper critical field H c 3 for a thin-film superconductor with a ferromagnetic dot