Updated with loop to receive multiple integers