KIA AMANTI ENGINE PROBLEM

2005 Kia Amanti • 97,000 miles

•P0320 – Ignition/Distributor Engine Speed Input Circuit Malfunction
the rpm display has stopped working and the check engine light is on. I have read about the camshaft position sensor and the ignition failure sensor but dont know which way to go.