How Did Max Planck Find Quantum Theory