#include using namespace std; #define all(v) v.begin(),v.end() #define rall(v)v.rbegin(),v.rend() using ll = long long; using ull = unsigned long long; #define iINF 2000000000 #define llINF 9000000000000000000ll const int MOD9 = 998244353; const int MOD1 = 1000000000 + 7; const vector dx = {0,1,0,-1} , dy = {1,0,-1,0}; //chmin , chmax template bool chmin(T &a , T b){ if(a > b){a = b ; return 1;}return 0;} template bool chmax(T &a , T b){ if(a < b){a = b ; return 1;}return 0;} //io template std::istream& operator>>(std::istream& is , pair &p){ is >> p.first >> p.second; return is; } template std::ostream& operator<<(std::ostream& os , const pair &p){ os << " [" << p.first << " , " << p.second << "] "; return os; } //vio template void printv1(vector &v){ for(int i=0;i<(int)v.size()-1;i++) cout << v[i] << " "; cout << v.back() << "\n"; } template void printv2(vector & v){ for(auto &vi : v) cout << vi << "\n"; } template void printvv(vector> &vv){ for(auto &vvi : vv) printv1(vvi); } template void printve1(vector &v){ for(int i=0;i<(int)v.size()-1;i++) cerr << v[i] << " "; cerr << v.back() << "\n"; } template void printve2(vector & v){ for(auto &vi : v) cerr << vi << "\n"; } template void printvve(vector> &vv){ for(auto &vvi : vv) printve1(vvi); } template void vin(vector &v){ for(auto &vi : v) cin >> vi; } template void vvin(vector> &vv){ for(auto &vvi : vv) vin(vvi); } #include using namespace atcoder; int main(){cin.tie(0);ios::sync_with_stdio(0); ll n;cin >> n; vector s(n);vin(s); vector cnt(n,0); int ans = 0; int cntsum = 0; for(int i=0;i