Increasing decreasing sequence - Doubt only 4 Test Case pass

Please find code below

import java.util.*;
public class Main {
public static void main(String args[]) {

	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int count = 0;
	int a[]= new int[n] ;
	
	for(int i = 0; i<n; i++) {	
		
		a[i] = sc.nextInt();	
	}
	
	for(int i = 0 ; i<n-1;i++) {
		
		if(count == 0) {
			
			if(a[i]<a[i+1]) {
				count++;
			}
		}
		else if(count>1) {
			break;
		}
		
	}
	
	if(count == 0 || count ==1) {
		System.out.println("true");
	}
	else {
		System.out.println("false");
	}
}

}

Pls handled the situation where u get a series like first increasing and then decreasing
And what r u trying to do with ur else if block?