add throws NegativeException when the input contains negative numbers