#include using namespace std; long longestSequence(vector a) { int x=a.size(); long sum=0; for(int i=0;i> n; ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); vector a(n); for(int a_i = 0; a_i < n; a_i++){ cin >> a[a_i]; } long result = longestSequence(a); cout << result << endl; return 0; }