Let $S$ be a finite set of nonzero finite primes of $\mathcal O_F$, with the archimedean places already accounted for by $r_1$ and $r_2$. Let $\mathcal O_{F,S}$ be the ring obtained by inverting the primes in $S$. Then
\begin{align*}
\mathcal O_{F,S}^\times&\cong \mu(F)\oplus \mathbb Z^{r_1+r_2-1+|S|}.
\end{align*}