A student participated in a walk for charity. His friends pledged a total of $3.20 for each mile he walked. The student earned $22.40 for the charity. How many miles did he walk?