#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
int arr[n];
int sum = 0;
int times = 0;
for(int i = 0; i < n; i++){
cin >> arr[i];
}
for(int i = 0; i < n; i++){
sum += arr[i];
times += 1;
if(sum >= m){
cout << times;
break;
}
}
if(sum<m){
cout << "OAQ";
}
}