Getting SIGTSTPerror in STUPMACH

My Code is this:

    Scanner in = new Scanner(System.in);
    int t = in.nextInt();
    while(t-- > 0) {

        int n = in.nextInt();
        long[] s = new long[n];
        for(int k = 0; k < n; k++)
            s[k] = in.nextLong();
        
        long tokens = 0;

        while(n >= 0) {
            int count = 0;
            for(int i = 0; i < n ; i++) {
                if(s[i] > 0) {                        
                    count++;
                    s[i] = s[i] - 1;
                }else if(s[i] == 0) {
                    n = i+1;
                    break;
                }        
            }
            tokens += (count +1);
        }
        System.out.println(tokens);
    }

plzz help

You have a while loop with condition n>=0, but will that ever happen?