uva414 1D array manipulation.