Simplify the input loop.