Painter's board porblem

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
int p = cin.nextInt(), b = cin.nextInt(), br[] = new int[b], max = Integer.MIN_VALUE;
for(int i = 0;i<br.length;i++){
br[i] = cin.nextInt();
if(max<br[i]){
max = br[i];
}
}
System.out.println(max);
}
}===== what’s the error in the code