Convert input into cents for the algorithm