  We use $K$-theory of the $C^*$-algebras to study the Arakelov geometry, i.e.
a compactification of the arithmetic schemes $V\to Spec ~\mathbf{Z}$. In
particular, it is proved that the Picard group of $V$ is isomorphic to the
$K_0$-group of a Cuntz-Pimsner algebra associated to $V$. We apply the result
to the finiteness problem for the algebraic varieties over number fields.
