Find the largest natural number \( n \) such that
$$2^{40} + 2^{2000} + 2^{2n}$$
becomes a perfect square.