Lectures on spectral theory of elliptic operators