#include using namespace std; int n,x,k,f[23]; int main() { int i; cin>>n; for (i=0;i>x; ++f[x%23]; } for (i=0;i<23;++i) if (f[i]) ++k; cout<