#include
using namespace std ;
bool sorted(int a[],int n,int i){
if(i>=n-1)return true ;
if(a[i] > a[i+1])return false ;
sorted(a,n,i+1) ;
//return true ;
}
int main() {
int n ;
cin >> n ;
int a[n] ;
for(int i = 0 ; i < n ;i++) cin >> a[i] ;
if(sorted(a,n,0))cout << “true” ;
else cout << “false” ;
return 0;
}