#include #include using namespace std; int c[1100]; int main(){ int a;scanf("%d",&a); int r=0; for(int i=0;i