how can i get positive value entered??
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = 0;
int temp = 0;
//write your code here
int n = Integer.parseInt(reader.readLine());
for(int i = 1; i < n; i++){
temp = Integer.parseInt(reader.readLine());
if(temp > maximum){
maximum = temp;
}
}
System.out.println(maximum);
} //main
}//class