Fixed bug where only positive integers were being accepted. Input loop uses sentinel value of -999 (had to make a sacrifice somewhere).