add a program that reads an unknown number of inputs