#include<stdio.h> int main() { int n,m; int t; scanf("%d",&t); while(t--) { scanf("%d",&n); m = n/958; printf("%d\n",m); } return 0; }