import java.io.*; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = null; while((str = in.readLine()) != null){ int n = Integer.parseInt(str); String[] arr = in.readLine().split(" "); int[] res = new int[n]; for(int i = 0;i < n;i++){ res[i] = Integer.parseInt(arr[i]); } int post = 0; int flag = 0; for(int index = 0;index < n;index ++){ if(index > post){ flag = 1; break; } post = Math.max(res[index]+index,post); if(post >= n-1){ break; }
}
if(flag == 0){
System.out.println(true);
}else{
System.out.println(false);
}
}
}
}