#include using namespace std; int N,P[50]; bool vis[50]; int cnt[50]; main() { cin>>N; for(int i=0;i>P[i]; P[i]--; } int outc=0; for(int i=0;i