Although it does not explicitly state it, use a scanner to solve this question. It is not required but it will be good practice for you to use one.