$k=<>;$x+=5968>>$k/$_&$k%$_<1for 2,3,5,7,11,13;print$x/36