#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,X; cin >> N >> X; vector A(N); for(auto &a : A) cin >> a; for(int i=0; i X) break; sum += A.at(pos); pos++; } answer = max(answer,sum); } cout << answer << endl; }