  We investigate the crossover from the semiclassical to the quantum
description of electron energy states in a chaotic metal grain connected to a
superconductor. We consider the influence of scattering off point impurities
(quantum disorder) and of quantum diffraction (quantum chaos) on the electron
density of states. We show that both the quantum disorder and the quantum chaos
open a gap near the Fermi energy. The size of the gap is determined by the mean
free time in disordered systems and by the Ehrenfest time in clean chaotic
systems. Particularly, if both times become infinitely large, the density of
states is gapless, and if either of these times becomes shorter than the
electron escape time, the density of states is described by random matrix
theory. Using the Usadel equation, we also study the density of states in a
grain connected to a superconductor by a diffusive contact.
