#include #include #include #include using namespace std; /* * Author * Robin Lee (hex539) */ int main(){ int n; cin>>n; vector h(n); for (int i=n; i--;) cin>>h[i]; int res=n; for (auto i: set(h.begin(),h.end())){ if (i>=n) continue; int cost=i; for (auto j: h){ if (j>i) ++cost; } res=min(res,cost); } cout<