import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner();
        int n = Integer.parseInt(sc.next());
        while (n-- > 0) {
            int x = Integer.parseInt(sc.next());
            System.out.println(x / 2);
        }

    }

    public static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.util.*;
public class CFS {
    public static void main (String [] args) {
        Scanner sc = new Scanner (System.in);
        int t = sc.nextInt();
        for(int i = 1; i <= t; i++)
          System.out.println((int)Math.floor(sc.nextDouble()/2));
    }
}

import java.io.*;
import java.util.*;
public class a1093{
	public static void tung(long x){
		for(int hai=0; hai<=50; hai++)
				for(int ba=0; ba<=33; ba++)
					for(int bon=0; bon<=25; bon++)
						for(int nam=0; nam<=20; nam++)
							for(int sau=0; sau<=17; sau++)
								for(int bay=0; bay<=15; bay++){
									if(hai*2+3*ba+4*bon+5*nam+6*sau+7*bay==x){
										System.out.println(hai+ba+bon+nam+sau+bay);
										return;
									}
								}
	}
	public static void tung2(long x){
		long n = x / 2;
		System.out.println(n);
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for(int i=1; i<=t; i++){
			long x = sc.nextLong();
			tung2(x);
		}
	}
}

import java.util.Scanner;

public class DiceRolling {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int q;
        q = input.nextInt();
        for (int j = 0; j < q; j++) {
            int n, n1 = 0, n2 = 0, n3 = 0;
            n = input.nextInt();
            for (int i = 2; i <= 7; i++) {
                if (n % i != 1 && n % i != 0) {
                    n1 = n / i;
                    System.out.println(n1 + 1);
                    break;
                } else if (n % i == 0) {
                    n1 = n / i;
                    System.out.println(n1);
                    break;
                }
            }
        }

    }

}

import java.util.*;
public final class Solution {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-- != 0) {
            int n = sc.nextInt();
            int sum = 0;
            if(n % 7 == 1) {
                sum += n / 6 + 1;
                System.out.println(sum);
                continue;
            }
            sum += n / 7 + 1;
            System.out.println(sum);
        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int t = input.nextInt();
        int[] answer = new int[t];
        for(int i = 0; i < t; i ++) {
            int number = input.nextInt();
            answer[i] = diceRoll(number);
        }
        for(int i = 0; i < t; i ++) {
            System.out.println(answer[i]);
        }
    }

    public static int diceRoll(int total) {
        if(total % 7 == 0) {
            return total / 7;
        }
        else {
            return total / 7 + 1;
        }
    }

}

import java.util.*;
import java.util.Scanner;
public class Dice
{
    public static void main(String args[])
    {
        int t,p,i;
        Scanner ob=new Scanner(System.in);
        t=ob.nextInt();
      int a[]=new int[t];
        for(i=0;i<t;i++)
        {
            a[i]=ob.nextInt();

        }
         for(i=0;i<t;i++)
         {
             p=(a[i]/7)+1;
             System.out.println(p);
         }
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

public class A {
	public static void main(String[] args) throws Exception {
		int[] X = new int[101];
		Arrays.fill(X, -1);
		X[2] = 1;
		for (int i = 2; i < X.length; i++) {
			if (X[i] == -1)
				continue;
			for (int j = 2; j <= 7; j++) {
				if (i + j < X.length)
					X[i + j] = Math.min((X[i] + 1), (X[i + j] == -1 ? Integer.MAX_VALUE : X[i + j]));
			}
		}

		int t = sc.nextInt();
		while (t-- > 0) {
			int x = sc.nextInt();
			int c = x / 7 + (x % 7 == 0 ? 0 : 1);
			System.out.println(c);
		}
	}

	// **SOLUTION**
	public static void solve() throws Exception {
		int n = sc.nextInt();
		int[] arr = new int[n];

		for (int i = 0; i < arr.length; i++) {
			arr[i] = sc.nextInt();
		}
		System.out.println(8);
	}

	public static InputStreamReader r = new InputStreamReader(System.in);

	public static BufferedReader br = new BufferedReader(r);

	public static Scanner sc = new Scanner(System.in);
}

import java.util.Scanner;

public class August {

  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    int t = input.nextInt();
    for(int i=0;i<t;i++){
      int n = input.nextInt();
      System.out.println(n/2);
    }

  }
}

//package Educational.Codeforces.Round;

import java.util.Scanner;

/** http://codeforces.com/contest/1093/standings
 * @author root
 *
 */
public class Main {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
		Scanner input = new Scanner(System.in);

		int t = input.nextInt();
		int[] num = new int[t];
		for(int i =0;i<t;i++) {
			int a = input.nextInt();
			int chu = a/7;
			int yu = a%7;
			if(a<=7 && a>=2)
				num[i]=1;
			else if(yu==0)
				num[i]=chu;
			else
				num[i]=chu+1;
		}
		for(int i=0;i<num.length;i++) {
			System.out.println(num[i]);
		}
	}
}

import java.io.*;
import java.util.InputMismatchException;

public class DiceRolling {
	public static void main(String[] args) throws Exception {
		InputReader scan = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);

		int t = scan.nextInt();

		while(t-- > 0) {
			out.println(scan.nextInt() / 2);
		}

		out.flush();

		out.close();
	}

	private static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1) {
				throw new InputMismatchException();
			}
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9') {
					throw new InputMismatchException();
				}
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String next() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			byte[] buf = new byte[64];
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public double nextDouble() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.') {
				if (c == 'e' || c == 'E') {
					return res * Math.pow(10, nextInt());
				}
				if (c < '0' || c > '9') {
					throw new InputMismatchException();
				}
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.') {
				c = read();
				double m = 1;
				while (!isSpaceChar(c)) {
					if (c == 'e' || c == 'E') {
						return res * Math.pow(10, nextInt());
					}
					if (c < '0' || c > '9') {
						throw new InputMismatchException();
					}
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9') {
					throw new InputMismatchException();
				}
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public boolean isSpaceChar(int c) {
			if (filter != null) {
				return filter.isSpaceChar(c);
			}
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	private static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0) {
					writer.print(' ');
				}
				writer.print(objects[i]);
			}
			writer.flush();
		}

		public void println(Object... objects) {
			print(objects);
			writer.println();
			writer.flush();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class G {
	public static void main(String[] args) {
		try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String linea;
            linea = br.readLine();
            int t = Integer.parseInt(linea);
            int h = 0;
            int k = 0;
            for(int i = 0; i < t; i++) {
            	linea = br.readLine();
                int x = Integer.parseInt(linea);
                    while(h != x) {
                        h = (int) (h + (((5) * Math.random()) + 2));
                        k++;
                        if(h > x) {
                            h = 0;
                            k = 0;
                        }
                    }
                    System.out.println(k);
            }

	} catch (IOException e) {
	    e.printStackTrace();
	}

	}

}

import java.util.*;
public class DiceRolling {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		for(int i = 0 ; i< times; i++) {
			int x = sc.nextInt();
			if(x/2==0)System.out.println(1);
			else System.out.println(x/2);
		}
	}
}
/*
17
38
56
16
7
36
29
95
50

3
7
11
3
1
7
5
19
10

8
19
28
8
3
18
14
47
25
*/

import java.util.*;
public class DiceRolling {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		for(int i = 0 ; i< times; i++) {
			int x = sc.nextInt();
			if(x/5==0)System.out.println(1);
			else {
				int ans=x/5;
				if(x%5!=0) {
					ans++;
				}
				System.out.println((x/5)+1);
			}

		}
	}
}
/*
17
38
56
16
7
36
29
95
50

3
7
11
3
1
7
5
19
10

8
19
28
8
3
18
14
47
25
*/

import java.util.Scanner;

public class A1093 {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();

        for (int i = 0; i < t; i++){
            int x = scan.nextInt();
            System.out.println((x+6)/7);
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author ky112233
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ADiceRolling solver = new ADiceRolling();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class ADiceRolling {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int x = in.nextInt();
            out.println(x % 7 == 0 ? x / 7 : x / 7 + 1);
        }

    }
}

import java.util.*;
public class a{
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		int t=in.nextInt();

		HashMap<Integer,ArrayList<ArrayList<Integer>>> hash=printSubsets();

		while(t--!=0){

			int divisor=in.nextInt();
			boolean flag=false;

			for(Map.Entry<Integer,ArrayList<ArrayList<Integer>>> entry: hash.entrySet()){

				ArrayList<ArrayList<Integer>> temp=entry.getValue();

				for(int i=0;i<temp.size();i++){

					ArrayList<Integer> x=temp.get(i);
					int sum=divisor;
					int count=0;

					for(int j=x.size()-1;j>=0;j--){
						count=count+(sum/x.get(j));
						sum=sum%x.get(j);
					}
					if(sum==0){
						System.out.println(count);
						flag=true;
						break;
					}

				}
				if(flag)
					break;
			}

		}
	}

	static HashMap<Integer,ArrayList<ArrayList<Integer>>> printSubsets(){

        int[] set={2,3,4,5,6,7};
        int n=set.length;

        HashMap<Integer,ArrayList<ArrayList<Integer>>> hash=new HashMap<Integer,ArrayList<ArrayList<Integer>>>();

       	for(int i=0;i<=6;i++){
       		hash.put(i,new ArrayList<ArrayList<Integer>>());
       	}

        for (int i=0;i<(1<<n);i++){

 			int size=0;
 			ArrayList<Integer> ar=new ArrayList<Integer>();

            for (int j=0;j<n;j++){
                if ((i & (1 << j)) > 0){
                	size++;
                	ar.add(set[j]);
                }
            }
           // Collections.sort(ar);
  			hash.get(size).add(ar);
        }

        return hash;
    }
}

import java.util.*;
import java.util.Scanner;

public class Hola {

    public static void main(String args[]){

        Scanner in=new Scanner(System.in);

        int t =in.nextInt();

        while (t>0) {
            double sol=0;
            int cx=in.nextInt();
           if(cx>7)
                System.out.println(cx/2);
           else
                System.out.println("1");
            t--;

        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner();
        int n=Integer.parseInt(sc.next());
        while(n-->0){
            int x=Integer.parseInt(sc.next());
            System.out.println((x+6)/7);
        }

    }

    public static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf182 implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Cf182(),"Main",1<<27).start();
	}

	public static long gcd(long a, long b)
	{
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	//  array sorting by colm
public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override
          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	// gcd

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}
	// fibonaci
	static int fib(int n)
    {
        int a = 0, b = 1, c;
        if (n == 0)
            return a;
        for (int i = 2; i <= n; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return b;
    }

// sort a string
    public static String sortString(String inputString)
    {

        char tempArray[] = inputString.toCharArray();

        Arrays.sort(tempArray);

        return new String(tempArray);
    }
    // pair function

    // list.add(new Pair<>(sc.nextInt(), i + 1));
    //     Collections.sort(list, (a, b) -> Integer.compare(b.first, a.first));
    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {}

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }
    private static int next(ArrayList<Integer> arr, int target)
    {
        int start = 0, end = arr.size() - 1;

        int ans = -1;
        while (start <= end) {
            int mid = (start + end) / 2;

            if (arr.get(mid) <= target) {
                start = mid + 1;
            }
            else {
                ans = mid;
                end = mid - 1;
            }
        }
        return ans;
    }

    public static String LCS(char[] x, char[] y)
    {
      String[][] table= new String[x.length+1][y.length+1];
          for(int i=0;i<=x.length;i++)
          {
              for(int j=0;j<=y.length;j++)
              {
                if(i==0 || j==0)
                    table[i][j] = "";
                else if(x[i-1]==y[j-1])
                    table[i][j] = table[i-1][j-1]+Character.toString(x[i-1]);
                else
                {
                    int p = (table[i-1][j]).length();
                    int q = (table[i][j-1]).length();
                    if(p>q)
                        table[i][j] = table[i-1][j];
                    else
                       table[i][j] = table[i][j-1];
                }
            }

          }
         return table[x.length][y.length];
    }

    public static int primeFactors(long n)
    {
        int ans = -1;

        while (n%2==0)
        {
            ans = Math.max(2,ans);
            n /= 2;
        }

        for (int i = 3; i <= Math.sqrt(n); i+= 2)
        {

            while (n%i == 0)
            {
               ans = Math.max(ans,i);
                n /= i;
            }
        }

        if (n > 2)
            return (int)n;
        return ans;
    }
    static boolean isPowerOfTwo(int n)
    {
        if(n==0)
        return false;

    return (int)(Math.ceil((Math.log(n) / Math.log(2)))) ==
           (int)(Math.floor(((Math.log(n) / Math.log(2)))));
    }
	public void run()
	{
		InputReader sc = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int t = sc.nextInt();
		while(t--!=0)
		{
    		int n = sc.nextInt();
    	        System.out.println(n/2);
		}
	}
}

import java.util.*;
import java.io.*;

public class CodeForces
{
	public static void main(String[] args)throws IOException
	{
		Scanner sc=new Scanner(System.in);
		//Scanner sc=new Scanner(new File("ip.txt"));
		int t,x;

		t=sc.nextInt();
		while(t-->0)
		{
			x=sc.nextInt();
			System.out.println(x/2);

		}

		//System.out.println(1);
	}
}

import java.util.*;
import java.io.*;
public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int t = in.nextInt();
    for(int i = 0; i < t; i++){
      System.out.println((int)Math.floor(in.nextDouble()/2));
    }
  }
}

import java.util.*;

public class Solution {

    public static int getCount(int num) {

        if(num >=0 && num <= 7)
            return 1;

        return getCount(num-7)+1;
    }

    public static void main(String args[]){

        Scanner input = new Scanner(System.in);
        int testCases = input.nextInt();
        for(int index=0; index < testCases; index++){
            int num = input.nextInt();
            System.out.println(getCount(num));
        }

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner();
        int n=Integer.parseInt(sc.next());
        while(n-->0){
            int x=Integer.parseInt(sc.next());
            System.out.println(x/2);
        }

    }

    public static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.util.*;

public class DiceRolling {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int t = s.nextInt();
    while (t-- > 0) {
      int x = s.nextInt();
      System.out.println((x / 7) + ((x % 7) > 0 ? 1 : 0));
    }
  }
}

import java.util.*;
public class meme {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-- >0){
			int x = sc.nextInt();
			System.out.println(x/2);

		}
	}
}

import java.util.*;
import static java.lang.Math.*;
public class Demo{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		while (t-->0){
			int x = in.nextInt();
			System.out.println((x+6)/7);
		}
	}
}

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Arrays;
import java.math.BigInteger;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
     public static void main (String[] args) throws java.lang.Exception
     {
     	Scanner in =new Scanner(System.in);
		int t=1,i,j,l,n,m,k=0,p=0,h=0;
		String s="",st="";
		n=in.nextInt();
		int a[]=new int[n];
		for(j=0;j<n;j++)
		{
		     a[j]=in.nextInt();
		     if(a[j]%7==0)
		          System.out.println(a[j]/7);
		     else
		          System.out.println((a[j]/7)+1);
		}
	}
}

import java.lang.*;
import java.util.*;
import java.io.*;
public class test
{
	int t,a ;

	Scanner sc=new Scanner(System.in);
	PrintWriter pr=new PrintWriter(System.out,true);
	public static void main(String... args)
	{
       test c=new test();
       c.prop();
	}
	public void prop()
	{

		t=sc.nextInt();

		for (int i=0;i<t ;++i ) {
			a=sc.nextInt();

			 pr.println(a/2);

		}

	}
}

import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);

        int n=sc.nextInt();
        while(n-->0) {
            int a=sc.nextInt();
            System.out.println(a/2);
        }
    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int t = Integer.parseInt(scan.nextLine());

        for (int i = 0; i < t; i++) {
            int n = Integer.parseInt(scan.nextLine());
            if (n % 7 == 0) System.out.println(n / 7);
            else System.out.println(n / 7 + 1);
        }
    }
}

import java.util.Scanner;
public class MyClass {
    public static void main(String args[]) {
            Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
        for(int i=0;i<n;i++){int a=sc.nextInt();System.out.println((int)(a/2));  }

    }
}

import java.util.*;
public class dice
{
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();int c=0,z=0;
        while(n-->0)
        {
        int x=s.nextInt(); c=0;
        while(true)
        {
        if(x>=2 && x<=7){c++; break;}
        else{

            if(x==0 || x==1){c+=2;break;}
            x=x-7;
            c++;
          }
        }
        System.out.println(c);
        }

    }
}

 //codeforces 700
                        import java.io.*;
                        import java.util.*;
                        import java.util.Arrays;
                        import static java.lang.System.out;
                        public class DiceRolling
                        {
                            public static void main(String args[])
                            {
                               Scanner sc=new Scanner(System.in);
                               int t=sc.nextInt();
                               while(t-->0)
                               {
                                   int n=sc.nextInt();
                                   if(n<7)
                                   out.println("1");
                                   else
                                   out.println((n/7)+1);

                               }//while ends

                            }//main ends
                        }//class ends

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class skill {
public static void main (String args[]) throws IOException{
	Scanner sc = new Scanner (System.in);
int n = sc.nextInt();
int []a = new int [n];
for (int i = 0 ; i<n;i++)
	a[i]= sc.nextInt();
int s = 0 ;
int c  ;
for (int i =  0 ; i <n ; i++){
	c = 0 ; int k = a[i];
	while (a[i]!= 0 ){
		if (a[i]==1 ){
			c= 0 ; a[i]= k ;
		}
	s=(int) (Math.floor(Math.random() *6)+2);
	if (s<=a[i]){c++; a[i]= a[i]-s ;
	}

}

	System.out.println(c);
	}
}

static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
        public Scanner(String file) throws Exception {br = new BufferedReader(new FileReader(file));}
        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        public String nextLine()throws IOException{return br.readLine();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public double nextDouble() throws IOException {return Double.parseDouble(next());}
        public char nextChar()throws IOException{return next().charAt(0);}
        public Long nextLong()throws IOException{return Long.parseLong(next());}
        public boolean ready() throws IOException{return br.ready();}
        public void waitForInput() throws InterruptedException {Thread.sleep(3000);}
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by Jason Qiao on 12/22/2018.
 */
public class diceRolling {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        int n = Integer.parseInt(sc.nextLine());
        for (int i = 0; i < n; i++) {
            out.println((int) Math.floor(Integer.parseInt(sc.nextLine())/2));
        }

        out.close();
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

// 作者：杨成瑞先生
import java.io.*;
import java.util.*;

public class cf {

	static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer(br.readLine());
            } catch (Exception e){e.printStackTrace();}
        }

        public String next() {
            if (st.hasMoreTokens()) return st.nextToken();
            try {st = new StringTokenizer(br.readLine());}
            catch (Exception e) {e.printStackTrace();}
            return st.nextToken();
        }

        public int nextInt() {return Integer.parseInt(next());}

        public long nextLong() {return Long.parseLong(next());}

        public double nextDouble() {return Double.parseDouble(next());}

        public String nextLine() {
            String line = "";
            if(st.hasMoreTokens()) line = st.nextToken();
            else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
            while(st.hasMoreTokens()) line += " "+st.nextToken();
            return line;
        }
    }

    static int mod = 1000000007;
    static long oo = Long.MAX_VALUE;

	public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter pw = new PrintWriter(System.out);

        int q = sc.nextInt();
        while(q-->0) {
            pw.println(sc.nextInt() / 2);
        }

        pw.close();
    }

}

import java.util.Scanner;

/**
 * Created by jai on 15/12/18.
 */
public class p1093a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            int k = sc.nextInt();
            int n = k / 2 ;
            System.out.println(n);
        }
    }
}

//http://codeforces.com/problemset/problem/1093/A
import java.util.Scanner;

public class _1093A {
    public static void main(String[] args) {
        Scanner scnr = new Scanner(System.in);
        int queryCount = scnr.nextInt();
        int numRolls = 0;
        int[] queries = new int[queryCount];
        for(int i = 0; i < queries.length; i++)
        {
            queries[i] = scnr.nextInt();
        }
        for(int z = 0; z < queries.length; z++)
        {
            numRolls = 0;
            if((queries[z] > 7 && queries[z]%7 > 1) || queries[z]%7 == 0)
            {
                numRolls+= queries[z]/7;
                queries[z] %= 7;
            }
            if((queries[z] > 6 && queries[z]%6 > 1) || queries[z]%6 == 0)
            {
                numRolls+= queries[z]/6;
                queries[z] %= 6;
            }
            if((queries[z] > 5 && queries[z]%5 > 1) || queries[z]%5 == 0)
            {
                numRolls+= queries[z]/5;
                queries[z] %= 5;
            }
            if((queries[z] > 4 && queries[z]%4 > 1) || queries[z]%4 == 0)
            {
                numRolls+= queries[z]/4;
                queries[z] %= 4;
            }
            if(queries[z] > 3 || queries[z] % 3 == 0)
            {
                numRolls+= queries[z]/3;
                queries[z] %= 3;
            }
            if(queries[z] > 2 || queries[z] % 2 == 0)
            {
                numRolls+= queries[z]/2;
                queries[z] %= 2;
            }
            System.out.println(numRolls);
        }
    }
}

import java.util.*;
public class mohammad {
    public static void main(String[] args) {
        /* --------------->Mohammad Abohasan<--------------- */
        Scanner sc = new Scanner (System.in);
        int t = sc.nextInt();
        while(t-->0){
            int n = sc.nextInt();
            System.out.println(n/2);
        }
    }
}
/*
4
2
13
37
100
*/

//import java.sql.SQLOutput;
import javax.swing.plaf.metal.MetalTheme;
import java.util.*;
import java.io.*;
import java.lang.*;

public class Solution {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

        public static void main(String[] args) throws Exception {

            FastReader in=new FastReader();
            int t=in.nextInt();
            for (int j=0; j<t; j++){
                int x=in.nextInt();

                System.out.println(x/2);
                }

            }
        }

import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in) ;
        int n = sc.nextInt() ;
        for (int i =0 ; i< n ; i++){
          System.out.println(sc.nextInt() / 2);
        }

    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package javaapplication51;

import java.util.Scanner;

/**
 *
 * @author Pascal-PC
 */
public class JavaApplication51 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
         Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for (int i = 0; i < n; i++) {
            int y=in.nextInt();
             System.out.println(y/7+1);
        }
    }

}

import java.util.*;

public class Main{

    public static void main(String args[])
    {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        for(int i=0;i<n;i++)
        {
            int q=scan.nextInt();
            System.out.println(q/2);
        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int nmb;
        int nmblan;
        int cmp=1;
        int ran=7;
        nmb=sc.nextInt();
        for(int i=0;i<nmb;i++){
            cmp=1;
            nmblan=sc.nextInt();
            if( nmblan>7){
            while(nmblan>7){
                nmblan=nmblan-ran;
                cmp=cmp+1;
            }
            System.out.println(cmp);
        }
            else System.out.println(1);
        }

    }
}

import java.util.Scanner;
public class Dice{
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int t = s.nextInt();
		int[] x = new int[t];
		int[] ans = new int[t];
		for(int i=0;i<t;i++){
			x[i]=s.nextInt();
			if((x[i]%7)!=1&&(x[i]%7)!=0)
			ans[i]=(x[i]/7)+1;
			if((x[i]%7)==0)
			ans[i]=(x[i]/7);
			if((x[i]%7)==1)
			ans[i]=(x[i]/7)+2;

		}
		for(int i=0;i<t;i++){
			System.out.println(ans[i]);
		}
		s.close();
	}
}

import java.util.Scanner;

public class Main {

    private static final Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = sc.nextInt();
        while (n-- > 0) {
            System.out.println(calculate(sc.nextInt()));
        }

    }

    private static int calculate(int nextInt) {
        if (nextInt <= 7) {
            return 1;
        }
        return nextInt % 2 == 0 ? nextInt/2 : 1 + (nextInt - 3) /2;
    }

}

import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt();
		for (; t > 0; t--) {
			int x = scan.nextInt();
			System.out.println((x / 6) + 1);
		}
		scan.close();
	}
}

import java.util.*;
public class A {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();int c=0;
		for (int i=0;i<t;i++) {
			int a=sc.nextInt();
			if(a==2||a==3||a==4||a==5||a==6||a==7)
				c=1;
			else {
				c=0;

					while(a>7){
						a-=7;
						c++;
					}
					while(a>=6){
						a-=6;
						c++;
					}
					while(a>=5){
						a-=5;
						c++;
					}
					 while(a>=4){
						a-=4;
						c++;
					}
					while(a>=3){
						a-=3;
						c++;
					}
					while(a>=2){
						a-=2;
						c++;
					}
					if(a==1) c++;
				}
				System.out.println(c);
		}

	}

}

import java.io.*;
import java.util.*;
public class dice{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int arr[]=new int[n];
int c[]=new int[n];
for(int i=0;i<n;i++){
arr[i]=sc.nextInt();
for(int j=7;j>=2;j--){
if(arr[i]%j!=1)
{if(arr[i]%j!=0)c[i]=arr[i]/j+1; else c[i]=arr[i]/j; break;}
}
}
for(int i=0;i<n;i++) System.out.println(c[i]);
}}

import java.util.*;

public class Demo
{
       public static void main(String args[])
       {
              Scanner sc=new Scanner(System.in);
              int n=sc.nextInt();
              int a[]=new int[n];
              for(int i=0;i<n;i++)
              {
                     a[i]=sc.nextInt();
                     int ans=0;
                     if(a[i]%2==0)
                            ans=a[i]/2;
                     else
                     {
                            if(a[i]-3>0)
                            {
                                   ans++;
                                   a[i]=a[i]-3;
                                   ans=ans+(a[i]/2);
                            }
                            else if(a[i]==3)
                                   ans=1;
                     }
                     System.out.println(ans);
              }

       }
}

import java.io.IOException;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {

		int t, finalAnS;
		int[] dice = new int[]{2,3,4,5,6,7};
		ArrayList<Integer> answers = new ArrayList<Integer>();
		finalAnS = 0;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());

		t = Integer.parseInt(st.nextToken());

		for(int i = 0; i < t; ++i){

			StringTokenizer st1 = new StringTokenizer(br.readLine());
			int query = Integer.parseInt(st1.nextToken());

			int temp = 0;

				for(int j = 0; j < 5; j++){
					for(int k = 0; k < 5; k++){

						if((temp += dice[k]) < query){
						temp += dice[k];
						finalAnS += k;
						}

						if(temp >= query){
							break;
						}
					}

					if(temp >= query){
						answers.add(finalAnS + 1);

						finalAnS = 0;
						break;
					}
				}
		}

		for(int i = 0; i < answers.size(); i++){
			System.out.println(answers.get(i));
		}
	}
}

import java.util.Scanner;

public class Main {

    public static void main(String [] args)
    {
        Scanner input = new Scanner(System.in);

      int  n= input.nextInt();

        while (n>0)
        {
         int   x = input.nextInt();
            System.out.println(x/2);
            n--;
        }

    }
}

import java.util.Scanner;

public class DiceRolling {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		while(n-->0) System.out.println(scan.nextInt()/7 + 1);
	}

}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws Exception {
        init();
        int n = nextInt();
        for (int i = 0; i < n; i++) {
            int t = nextInt();
            out.println(t / 2);
        }
        out.close();
    }

    static BufferedReader scan;
    static PrintWriter out;
    static StringTokenizer st;

    static void init() {
        scan = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    static void init(String name1, String name2) throws Exception {
        scan = new BufferedReader(new FileReader(name1));
        out = new PrintWriter(name2);
    }

    static void smart_init(String n1, String n2) throws Exception {
        try {
            init(n1, n2);
        } catch (Exception e) {
            init();
        }
    }

    static String next() throws Exception {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(scan.readLine());
        return st.nextToken();
    }

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static void dbg(Object[] obj) {
        System.out.println(Arrays.toString(obj));
    }
}

import java.util.*;
public class cp1{
	public static void main(String args[]){
		Scanner in=new Scanner (System.in);
		int t=in.nextInt();
		while(--t>=0){
			int n=in.nextInt();
			int sum=0;
			if(n%7==0){
				sum=n/7;
			}
			else{
				sum=n/7+1;
			}
			System.out.println(sum);
		}
	}
}

import java.util.Scanner;

public class DiceRolling {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);

		int t = in.nextInt();
		int [] points = new int [t];
		for(int i=0 ; i<t ; i++)
			points[i] = in.nextInt();

		for(int i=0 ; i<t ; i++) {

			if(points[i] <= 7)
				System.out.println(1);
			else {
				int cnt = 0;
				while(points[i] > 0) {

					points[i] -= 7;
					cnt++;
				}
				System.out.println(cnt);
			}
		}

	}

}

import java.util.Scanner;

public class DiceRolling {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);

		int t = in.nextInt();
		int [] faces = {7,6,5,4,3,2};
		int [] points = new int [t];
		for(int i=0 ; i<t ; i++)
			points[i] = in.nextInt();

		for(int i=0 ; i<t ; i++) {

			if(points[i] <= 7)
				System.out.println(1);
			else {
				if(points[i] % 7 == 0)
					System.out.println(points[i] / 7);
				else {

					if(points[i] % 7 > 1)
						System.out.println(points[i] / 7 + 1);
					else
						System.out.println(points[i] / 6 + 1);
				}

			}
		}
	}

}

import java.util.Scanner;

public class ADiceRolling {

    public static void main(String[] args) {

        int n,n7 = 0,n6 = 0,n5 = 0,n4 = 0,n3 = 0,n2 = 0;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        int vet [] = new int [n];
        for (int i = 0; i < n; i++) {
            vet[i]=sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            n7 = 0;
            n6 = 0;
            n5 = 0;
            n4 = 0;
            n3 = 0;
            n2 = 0;
            while (vet[i]>=2){
                n2 = n2 + 1;
                vet[i] = vet[i] - 2;
            }
            while (vet[i]>=3){
                n3 = n3 + 1;
                vet[i] = vet[i] - 3;
            }
            while (vet[i]>=4){
                n4 = n4 + 1;
                vet[i] = vet[i] - 4;
            }
            while (vet[i]>=5){
                n5 = n5 + 1;
                vet[i] = vet[i] - 5;
            }
            while (vet[i]>=6){
                n6 = n6 + 1;
                vet[i] = vet[i] - 6;
            }
            while (vet[i]>=7){
                n7 = n7 + 1;
                vet[i] = vet[i] - 7;
            }
            vet[i] = n7+n6+n5+n4+n3+n2;
        }
        for (int i = 0; i < n; i++) {
            System.out.println(vet[i]);
        }
    }
}

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a=scan.nextInt();
        for(int i = 0;i < a; i++){
            int b = scan.nextInt();
            int sum = 0;
            if(b >= 7 && b%7!=1){
                int t=b/7;
                sum+=t;
                b=b-t*7;
            }
           // System.out.println(b);
            if(b >= 6 && b%6!=1){
                int t = b/6;
                b=b-t*6;
                sum+=t;
               //System.out.println(b);
            }
            //System.out.println(b);
            if(b >= 5  && b%5!=1){
                int t=b/5;
                b=b-t*5;
                sum+=t;
            }
            if(b >= 4 && b%4!=1){
                int t=b/4;
                b=b-t*4;
                sum+=t;
            }
            if(b >= 3 && b%3!=1){
                int t=b/3;
                b=b-t*3;
                sum+=t;
            }
            if(b>=2){
                int t=b/2;
                b=b-t*2;
                sum+=t;
            }
            System.out.println(sum);
        }

    }
}

import java.util.*;
import java.io.*;

public class Main {

	void solve (FastScanner in, PrintWriter out) {

		int n = in.nextInt();
		for (int i=0; i<n; i++) {
			int temp = in.nextInt();
			if (temp%2 == 0) {
				out.println(temp/2);
			}
			else {
				out.println(temp/3 + temp%3/2);
			}
		}

	}

	public static void main(String[] args) {
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		Main main = new Main();
		main.solve(in, out);
		in.close();
		out.close();
	}

	static class FastScanner {

		private InputStream in;
		private byte[] buffer = new byte[1024];
		private  int length = 0, p = 0;

		public FastScanner (InputStream stream) {
			in = stream;
		}
		public boolean hasNextByte () {
			if (p < length) return true;
			else {
				p = 0;
				try {length = in.read(buffer);}
				catch (Exception e) {e.printStackTrace();}
				if (length <= 0) return false;
			}
			return true;
		}
		public int readByte () {
			if (hasNextByte() == true) return buffer[p++];
			return -1;
		}
		public boolean isPrintable (int n) {return 33<=n&&n<=126;}
		public void skip () {
			while (hasNextByte() && !isPrintable(buffer[p])) p++;
		}
		public boolean hasNext () {skip(); return hasNextByte();}
		public String next () {
			if (!hasNext()) throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int t = readByte();
			while (isPrintable(t)) {
				sb.appendCodePoint(t);
				t = readByte();
			}
			return sb.toString();
		}
		public String[] nextArray (int n) {
			String[] ar = new String[n];
			for (int i=0; i<n; i++) ar[i] = next();
			return ar;
		}
		public int nextInt () {return Math.toIntExact(nextLong());}
		public int[] nextIntArray (int n) {
			int[] ar = new int[n];
			for (int i=0; i<n; i++) ar[i] = nextInt();
			return ar;
		}
		public long nextLong () {
			if (!hasNext()) throw new NoSuchElementException();
			boolean minus = false;
			int temp = readByte();
			if (temp == '-') {
				minus = true;
				temp = readByte();
			}
			if (temp<'0' || '9'<temp) throw new NumberFormatException();
			long n = 0;
			while (isPrintable(temp)) {
				if ('0'<=temp && temp<='9') {
					n *= 10;
					n += temp - '0';
				}
				else throw new NumberFormatException();
				temp = readByte();
			}
			return minus? -n : n;
		}
		public double nextDouble () {
			return Double.parseDouble(next());
		}
		public void close () {
			try {in.close();}
			catch(Exception e){}
		}
	}

}

import java.util.Scanner;

public class Test {

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int testCase = sc.nextInt();
		while(testCase-->0){
			int n = sc.nextInt();
			 if(n<8){
				 System.out.println(1);
				 continue;
			 }

			 int output=0;
			 while(n>0){
				 if(n>6){
					 output++;
					 n-=7;
				 }else if(n>5){
					 output++;
					 n-=6;
				 }else if(n>4){
					 output++;
					 n-=5;
				 }else if(n>3){
					 output++;
					 n-=4;
				 }else if(n>2){
					 output++;
					 n-=3;
				 }else if(n>0){
					 output++;
					 n-=2;
				 }
			 }

			 System.out.println(output);
		}
		sc.close();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class p_1093a {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc = new Scanner(System.in);
		int num_case;
		int[] a = new int[101];

		num_case = sc.nextInt();

		for(int i=0; i<num_case; i++) {
			a[i] = sc.nextInt();
		}

		for(int i=0; i<num_case; i++) {
			int input = a[i];
			int quotient = (int)input/7;
			int mode = input%7;
			if(mode == 0) {
				System.out.println(quotient);
			}else {
				System.out.println(quotient+1);
			}

		}

	}
}

import java.math.*;
import java.util.*;
import java.util.*;

public class Z {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for (int q = 0; q < t; q++) {
			int x = sc.nextInt();
			System.out.println((x + 6) / 7);
		}

	}
}

import java.math.*;
import java.util.*;
import java.util.*;

public class Z {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for (int q = 0; q < t; q++) {
			int x = sc.nextInt();
			int y = x / 7;
			if (x % 7 == 0) {
				System.out.println(y);
			} else {
				System.out.println(y + 1);
			}

		}

	}
}

// package EducationalRoundsPracticw;
import java.io.*;
import java.util.*;

/*
    Author - Ribhav
    MADE ON - 12/16/2018
*/

public class CF1093A {

    static FastReader s;
    static PrintWriter out;
    static String INPUT = "4\n" +
            "2\n" +
            "13\n" +
            "37\n" +
            "100\n";

    public static void main (String[] args) {
        long time = System.currentTimeMillis();
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        out = new PrintWriter(System.out);
        s = new FastReader(oj);
        int t = s.nextInt();
        while(t-- > 0) {
            int x = s.nextInt();
            if(x % 2 == 0){
                out.println(x/2);
            } else {
                int ans = (x-3)/2;
                out.println(ans+1);
            }
        }

        if (!oj) {
            out.println(Arrays.deepToString(new Object[] { System.currentTimeMillis() - time + " ms" }));
        }
        out.flush();
    }

    private static class FastReader {
        InputStream is;

        public FastReader(boolean onlineJudge) {
            is = onlineJudge ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        }

        byte[] inbuf = new byte[1024];
        public int lenbuf = 0, ptrbuf = 0;

        int readByte() {
            if (lenbuf == -1)
                throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = is.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0)
                    return -1;
            }
            return inbuf[ptrbuf++];
        }

        boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                ;
            return b;
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        char nextChar() {
            return (char) skip();
        }

        String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        String nextLine() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while ((!isSpaceChar(b) || b == ' ')) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        char[] next(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        char[][] nextMatrix(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++)
                map[i] = next(m);
            return map;
        }

        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        int[][] next2DInt(int n, int m) {
            int[][] arr = new int[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextIntArray(m);
            }
            return arr;
        }

        long[][] next2DLong(int n, int m) {
            long[][] arr = new long[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLongArray(m);
            }
            return arr;
        }

        int[] shuffle(int[] arr) {
            Random r = new Random();
            for (int i = 1, j; i < arr.length; i++) {
                j = r.nextInt(i);
                arr[i] = arr[i] ^ arr[j];
                arr[j] = arr[i] ^ arr[j];
                arr[i] = arr[i] ^ arr[j];
            }
            return arr;
        }

        int[] uniq(int[] arr) {
            Arrays.sort(arr);
            int[] rv = new int[arr.length];
            int pos = 0;
            rv[pos++] = arr[0];
            for (int i = 1; i < arr.length; i++) {
                if (arr[i] != arr[i - 1]) {
                    rv[pos++] = arr[i];
                }
            }
            return Arrays.copyOf(rv, pos);
        }
    }
}

import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        int T = cin.nextInt();
        while(T-- > 0){
            int n = cin.nextInt();
            int thr = (n-3)/2-1;
            System.out.println(n % 2 == 0 ? n/2 : (thr > 0 ? thr : 1));
        }
    }
}

import java.util.*;
import java.io.*;
public class Main {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        while(t-->0){
            int n=sc.nextInt(),count=0,fact=0;
            for(int i=2;i<=7;i++){
                count+=n/i;fact=n/i;
                n=n-fact*i;
            }
            System.out.println(count);
        }
        // System.out.println("Hello World!");
    }
}

import java.util.*;
public class JavaApplication7 {
    public static void main(String[] args) {
       Scanner obj =new Scanner(System.in);
       int size = obj.nextInt();
       int [] arr= new int [size];
       for(int i=0; i<size;i++)
       arr[i]=obj.nextInt();
       int c=0;
       for(int i=0 ; i<size;i++){
            c=0;
           if(arr[i]>=2 && arr[i]<=7)
           c+=1 ;
           else
           { if(arr[i]%7==0)
           c+=arr[i]/7;
             else
           c+=(arr[i]/7)+1;
           }
           System.out.println(c);
       }

    }}

import java.util.*;
import java.util.Scanner;
public class Main{

    public static void main(String Args[]){

        Scanner sc=new Scanner(System.in);
           int t=sc.nextInt();

           while(t>0){
        	  int n=sc.nextInt();

        	  if( n%7==0) {
        		  System.out.println(n/7);
        	  }else {

        				  System.out.println((n/7)+1);

        			  }

      t--;
      }
}}

import org.w3c.dom.ls.LSOutput;

import java.lang.reflect.Array;
import java.rmi.MarshalException;
import java.util.*;
import java.io.*;
import java.math.*;

public class program {
    public static FastIO file = new FastIO();

    private static void solve() {
        int tt = nextInt();
//        int tt = 1;
        long start = 0;
        while (tt-- > 0) {
            int n = nextInt();
            int ans = n / 7;
            n -= 7 * ans;
            if (n > 0) ans++;
            System.out.println(ans);
        }
    }

    private static int[] nextArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = nextInt();
        return a;
    }

    public static int[][] nextArray2D(int n, int m) {
        int[][] result = new int[n][];
        for (int i = 0; i < n; i++) {
            result[i] = nextArray(m);
        }
        return result;
    }

    public static long pow(long n, long p) {
        long ret = 1L;
        while (p > 0) {
            if (p % 2 != 0L)
                ret *= n;
            n *= n;
            p >>= 1L;
        }
        return ret;
    }

    public static String next() {
        return file.next();
    }

    public static int nextInt() {
        return file.nextInt();
    }

    public static long nextLong() {
        return file.nextLong();
    }

    public static double nextDouble() {
        return file.nextDouble();
    }

    public static String nextLine() {
        return file.nextLine();
    }

    public static class FastIO {
        BufferedReader br;
        StringTokenizer st;

        public FastIO() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }

    public static void main(String[] args) {
        solve();
    }

}

//package com.baba;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        while (t-- > 0) {
            int x = s.nextInt();
            System.out.println(x/2);
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class codeforces {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		int at = sc.nextInt();
		for(int it=0;it<at;it++)
		{
		    int n = sc.nextInt();
            System.out.println(n/2);
		}
		sc.close();
	}
}

import java.util.Scanner;

public class DiceRolling_1093A {
    public static int numRolls(int x){
        if(x==8){
            return 2;
        }
        if(x<=1){
            return 0;
        }
        if(x>=2 && x<=7){
            return 1;
        }
        return 1+numRolls(x-7);
    }
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        for(int i=0; i<n; i++){
            System.out.println(numRolls(s.nextInt()));
        }
    }
}

//import java.sql.SQLOutput;
import javax.swing.plaf.metal.MetalTheme;
import java.util.*;
import java.io.*;
import java.lang.*;

public class Solution {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

        public static void main(String[] args) throws Exception {

            FastReader in=new FastReader();
            int t=in.nextInt();
            for (int j=0; j<t; j++){
                int x=in.nextInt();
                int sum=0;
                if(x>=2 && x<=7) {
                    //System.out.println(1);
                    sum+=1;
                }else {
                    sum+=x%5+x/5;
                }
                System.out.println(sum);
                }

            }
        }

import java.util.*;

public class DiceRolling
{
    public static void main(String[] args)
    {
        Scanner input = new Scanner( System.in );

        int q = input.nextInt();

        int counter = 0;

        for( int i = 0; i < q; i++ )
        {
            int sumOfPoints = input.nextInt();

            counter = 0;

            while( sumOfPoints >= 7 )
            {
                sumOfPoints -= 7;

                counter ++;
            }
            while( sumOfPoints >= 6 )
            {
                sumOfPoints -= 6;

                counter ++;
            }
            while( sumOfPoints >= 5 )
            {
                sumOfPoints -= 5;

                counter ++;
            }
            while( sumOfPoints >= 4 )
            {
                sumOfPoints -= 4;

                counter ++;
            }
            while( sumOfPoints >= 63 )
            {
                sumOfPoints -= 3;

                counter ++;
            }
            while( sumOfPoints >= 2 )
            {
                sumOfPoints -= 2;

                counter ++;
            }

            System.out.println( counter );
        }
    }
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws Exception {
        init();
        int n = nextInt();
        for (int i = 0; i < n; i++) {
            int t = nextInt();
            out.println(t / 2  + (t & 1));
        }
        out.close();
    }

    static BufferedReader scan;
    static PrintWriter out;
    static StringTokenizer st;

    static void init() {
        scan = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    static void init(String name1, String name2) throws Exception {
        scan = new BufferedReader(new FileReader(name1));
        out = new PrintWriter(name2);
    }

    static void smart_init(String n1, String n2) throws Exception {
        try {
            init(n1, n2);
        } catch (Exception e) {
            init();
        }
    }

    static String next() throws Exception {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(scan.readLine());
        return st.nextToken();
    }

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static void dbg(Object[] obj) {
        System.out.println(Arrays.toString(obj));
    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int[] arr = new int[t];
        for(int i = 0; i < arr.length;i++){
            arr[i] = sc.nextInt();
        }

        for(int i = 0; i < arr.length;i++){
            arr[i] = checkNumberOfSteps(arr[i]);
        }
        for(int i = 0; i < arr.length;i++){
            System.out.println(arr[i]);
        }

    }

    public static int checkNumberOfSteps(int num) {
        int result = 0;
        for(int i = 7;i >= 2;i--){
            if(num == 0)
                break;
            else if(num >= i){
                result += num / i;
                num = num % i;
            }
        }
        return result;
    }
}

import java.util.*;

public class DiceRolling
{
    public static void main(String[] args)
    {
        Scanner input = new Scanner( System.in );

        int q = input.nextInt();

        int counter = 0;

        for( int i = 0; i < q; i++ )
        {
            int sumOfPoints = input.nextInt();

            counter = 0;

            while( sumOfPoints >= 7 )
            {
                sumOfPoints -= 7;

                counter ++;
            }
            while( sumOfPoints >= 6 )
            {
                sumOfPoints -= 6;

                counter ++;
            }
            while( sumOfPoints >= 5 )
            {
                sumOfPoints -= 5;

                counter ++;
            }
            while( sumOfPoints >= 4 )
            {
                sumOfPoints -= 4;

                counter ++;
            }
            while( sumOfPoints >= 3 )
            {
                sumOfPoints -= 3;

                counter ++;
            }
            while( sumOfPoints >= 2 )
            {
                sumOfPoints -= 2;

                counter ++;
            }

            System.out.println( counter );

        }
    }
}

import java.util.*;
import java.util.Map.Entry;
import java.lang.*;
import java.math.*;
import java.text.*;
import java.io.*;
		public final class Solve {
		static PrintWriter out = new PrintWriter(System.out);
		static void flush() {
	 	out.flush();
	 	}
		static void run(long s, long e) {
		NumberFormat formatter = new DecimalFormat("#0.00000");
		System.out.print("Execution time is " + formatter.format((e - s) / 1000d) + " seconds");
		}
		static int gcd(int a, int b) {
			if (b == 0) return a;
			return gcd(b, a % b);
		}
		static long gcd(long a, long b) {
			if (b == 0) return a;
			return gcd(b, a % b);
		}
		static class FastReader {
	    BufferedReader br;
	    StringTokenizer st;

	    public FastReader() {
	    br = new BufferedReader(new
	    InputStreamReader(System.in));
	    }
	    static boolean isPalindrome(String str1, String str2) {
	    String str3 = str1+str2;
	    int i = 0, j = str3.length()-1;
	    while(i < j) {
	    char a = str3.charAt(i), b = str3.charAt(j);
	    if(a != b) return false;
	    i++;j--;
	    }
	    return true;
	    }
	    static boolean isPalindrome(String str) {
	    int i = 0, j = str.length()-1;
	    while(i < j) {
	    char a = str.charAt(i), b = str.charAt(j);
	    if(a != b) return false;
	    i++;j--;
	    }
	    return true;
	    }
	    String next() {
	    while (st == null || !st.hasMoreElements()) {
	    try{st = new StringTokenizer(br.readLine());}
	    catch (IOException  e) {e.printStackTrace();}
	    }
	    return st.nextToken();
	    }
	    int nextInt(){ return Integer.parseInt(next()); }
	    long nextLong() { return Long.parseLong(next());}
	    static int fact(int n) {
	    if(n == 1) return 1;
	    return n * fact(n-1);
	   	}
	    public int[] readIntArray(int n) {
	    int[] arr = new int[n];
		for(int i=0; i<n; ++i)
		arr[i]=nextInt();
		return arr;
		}
	    public long[] readLongArray(int n) {
	    	long[] arr = new long[n];
	    	for(int i=0; i<n; ++i)
	    		arr[i]=nextInt();
	    	return arr;
	    }
	    public int[][] readIntArray(int m, int n){
		int[][] arr = new int[m][n];
		for(int i = 0;i<m;i++)
		for(int j = 0;j<n;j++)
		arr[i][j] = nextInt();
		return arr;
	    }
	    public String[] readStringArray(int n) {
		String[] arr = new String[n];
		for(int i=0; i<n; ++i)
		arr[i]= nextLine();
		return arr;
	    }
	    double nextDouble() {return Double.parseDouble(next());}
	    String nextLine() {
	    String str = "";
	    try{str = br.readLine();}
	    catch (IOException e) {e.printStackTrace();}
	    return str;}
	    }
		static void solve(long[] arr, int n){
			long[] t = new long[n];
			int p = 0;
			for(int i =n-1;i >=n/2;i--) {
				t[i] = arr[p++];
			}
			for(int i = 0;i<t.length;i++) {
				out.print(t[i]+" ");
			}
			out.println();
			int i = 1;
			int j = n-2;
			long max1 = t[n-1];
			long max2 = 0;
			while(i < j) {
				if(t[j] > t[j+1]) {
					if(t[j] - t[j+1] == t[i-1] - t[i]) {
						t[j] = t[j+1];
						t[i] = t[i-1];
					}
					else {
					t[i] = t[j] - t[j+1];
					t[j] = t[j] - t[i];
					}
					max2 = t[i];
					max1 = t[j];
				}
				else if(t[j] == t[j+1] && t[i] != t[i-1]) {
					t[i] = max2;
					t[j] = t[j] - t[i];
					max1 = t[j];
				}
				else {
					long x = t[j];
					t[i] = max2;
					t[j] = x -  t[i];
					max1 = t[j];
				}
//				out.println(t[i]+" "+t[j]);
//				out.println(max2+" "+max1);
				i++;
				j--;
			}
			for(long k:t) {
				out.print(k+" ");
			}
		}
		public static void main(String args[]) throws IOException {
	    FastReader sc = new FastReader();
	    long s1 = System.currentTimeMillis();
	    int n = sc.nextInt();

	    long[] arr = sc.readLongArray(n/2);
	    solve(arr,n);
	    flush();
	    long e = System.currentTimeMillis();
//	    run(s1,e);
	    }
	}

import java.awt.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class day7 {
public static void main(String[] args) {
	Scanner s=new Scanner(System.in);
	String line=s.nextLine();
	int n=Integer.parseInt(line);
	int c=0;
	int[]res=new int[n];
	for (int i = 0; i < n; i++) {
		line=s.nextLine();
		int num=Integer.parseInt(line);
		while(num>=7) {
			num-=7;
			c++;
		}
		while(num>=6) {
			num-=6;
			c++;
		}
		while(num>=5) {
			num-=5;
			c++;
		}
		while(num>=4) {
			num-=4;
			c++;
		}
		while(num>=3) {
			num-=3;
			c++;
		}
		while(num>=2) {
			num-=2;
			c++;
		}
		if(num==0) {
			res[i]=c;
		}c=0;
	}
	for (int i = 0; i <n; i++) {
		System.out.println(res[i]);
	}

}

}

import java.io.*;
import java.util.*;

public class Main {

    static StringBuilder data;
    final static FastReader in = new FastReader();

    public static void main(String[] args) {
        int n = in.nextInt(),t,m,o;
        data= new StringBuilder();
        int a [] = {2,3,4,5,6,7};
        for (int i = 0; i < n; i++) {
            t=in.nextInt();
            if(t%2==0){
                data.append(t/2).append('\n');
            }else{
                o=0;
                for (int j = 0; j < 6; j++) {
                    m=t%a[j];
                    for (int k = 0; k < 6; k++) {
                        if(m==a[k]){
                            o=a[k];
                            break;
                        }
                    }
                    if(o>0){
                        data.append((t/a[j])+1).append('\n');
                        break;
                    }
                }
            }
        }
        System.out.println(data);
    }

    static void fileOut(String s) {
        File out = new File("output.txt");
        try {
            FileWriter fw = new FileWriter(out);
            fw.write(s);
            fw.flush();
            fw.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        public FastReader(String path) {
            try {
                br = new BufferedReader(new
                        InputStreamReader(new FileInputStream(path)));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        float nextFloat() {
            return Float.parseFloat(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}

    import java.util.Scanner;

    public class cude {
        public static void main(String[] args) {
            Scanner jin = new Scanner(System.in);
            int n = jin.nextInt();
            int sum = 0;
            for (int t = 0; t < n; t++) {
                int x = jin.nextInt();
                for (int i = 7; i >= 2; i--) {
                    sum += x / i;
                    x = x % i;
                }

                System.out.println(sum);
                sum = 0;
            }
        }
    }

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class skill {
public static void main (String args[]) throws IOException{
	Scanner sc = new Scanner (System.in);
int n = sc.nextInt();
int []a = new int [n];
for (int i = 0 ; i<n;i++)
	a[i]= sc.nextInt();
int s = 0 ;
int c  ;
for (int i =  0 ; i <n ; i++){
	c = 0 ;
	while (a[i]!= 0 ){
	s=(int) (Math.floor(Math.random() *7)+1);
	if (s<=a[i]){c++; a[i]= a[i]-s ;
	}

}

	System.out.println(c);
	}
}

static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
        public Scanner(String file) throws Exception {br = new BufferedReader(new FileReader(file));}
        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        public String nextLine()throws IOException{return br.readLine();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public double nextDouble() throws IOException {return Double.parseDouble(next());}
        public char nextChar()throws IOException{return next().charAt(0);}
        public Long nextLong()throws IOException{return Long.parseLong(next());}
        public boolean ready() throws IOException{return br.ready();}
        public void waitForInput() throws InterruptedException {Thread.sleep(3000);}
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int nmb;
        int nmblan;
        int cmp=1;
        nmb=sc.nextInt();
        for(int i=0;i<nmb;i++){
            nmblan=sc.nextInt();
            if( nmblan>7){
            while(nmblan>7){
                nmblan=nmblan-7;
                cmp=cmp+1;
            }
            System.out.println(cmp);
        }
            else System.out.println(1);
        }

    }
}

import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       for(int i=0;i<n;i++){
           int d=s.nextInt();
           int res=(d/2)+(d%2);
           System.out.println(res);
       }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner();
        int n=Integer.parseInt(sc.next());
        while(n-->0){
            int x=Integer.parseInt(sc.next());
            System.out.println((x+5)/7);
        }

    }

    public static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        ArrayList<Integer> nums = new ArrayList<>();
        ArrayList<Integer> ans = new ArrayList<>();
        String str = "234567";
        for(int i = 0 ; i < n; i++){
            int a = sc.nextInt();
            if(str.contains(String.valueOf(a))){
                ans.add(1);
            }else {
                nums.add(a);
            }
        }

        for(int i = 0; i < nums.size(); i++){
            int a = nums.get(i);
            int c = 0;
            while(!str.contains(String.valueOf(a))){
                a -= 2;
                c++;
            }
            ans.add(c);
        }

        for(int i = 0; i < ans.size(); i++){
            System.out.println(ans.get(i));
        }

    }

}

import java.util.*;
public class DiceRolling {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		for(int i = 0 ; i< times; i++) {
			int x = sc.nextInt();
			if(x/5==0)System.out.println(1);
			else System.out.println(x/5);
		}
	}
}

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class george
{
	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
 static int max(int a[],int n) {
	 int max=a[0];
	 int ind=0;
	 for(int i=1;i<n;i++) {
		 if(a[i]>=max) {
			 max=a[i];
			 ind=i;
		 }
	 }
	 return ind;
 }
 static int min(int a[],int n) {
	 int min=a[0];
	 int ind=0;
	 for(int i=1;i<n;i++) {
		 if(a[i]<min) {
			 min=a[i];
			 ind=i;
		 }
	 }
	 return ind;
 }
 static boolean fun(int i) {
	 for(int j=3;j<=20;j++) {
		 if(i%j!=0) {
			 return false;
		 }
	 }
	 return true;
 }
 static int bin(int arr[], int l, int r, int x)
 {
     if (r>=l)
     {
         int mid = l + (r - l)/2;

         if (arr[mid] == x)
            return mid;

         if (arr[mid] > x)
            return bin(arr, l, mid-1, x);
         return bin(arr, mid+1, r, x);
     }

     return -1;
 }
 static boolean isPalindrome(int n)
 {

     int divisor = 1;
     while (n / divisor >= 10)
         divisor *= 10;

     while (n != 0)
     {
         int leading = n / divisor;
         int trailing = n % 10;

         if (leading != trailing)
             return false;

         n = (n % divisor) / 10;

         divisor = divisor / 100;
     }
     return true;
 }
    public static void main(String[] args) throws IOException
    {
        Reader s=new Reader();
        int n = s.nextInt();
        while(n>0) {
        	int a = s.nextInt();
        	if(a%2==0) {
        		System.out.println(a/2);
        	} else if(a%3==0) {
            		System.out.println(a/3);
            	} else if(a%5==0) {
            		System.out.println(a/5);
            	}
            	 else if(a%7==0) {
             		System.out.println(a/7);
             	} else {
             		System.out.println((a-7)%2);
             	}

        	n--;
        }
    }
}

import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class C1215201802 {

  private static void solve(final Input input, final PrintWriter output) throws IOException {
    int n = input.nextInt();
    for (int i = 0; i < n; i++) {
      int num = input.nextInt();
      int count = 0;
      for (int j = 7; j >= 2 && num != 0; j--) {
        count += num / j;
        num = num % j;
      }
      output.println(count);
    }
  }

  public static void main(String[] args) throws IOException {
    try (final PrintWriter output = new PrintWriter(System.out);
        final Input input = new Input(new BufferedReader(new InputStreamReader(System.in)))) {
      solve(input, output);
    }
  }

  private static class Input implements Closeable {

    private final BufferedReader bufferedReader;
    private final StringBuilder stringBuilder = new StringBuilder();
    private final static char[] SEPERATOR = { '\t', '\n', '\r', ' ' };

    public Input(final BufferedReader in) {
      this.bufferedReader = in;
    }

    private boolean isAnySeperator(final char ch) {
      return ch == SEPERATOR[3] || ch == SEPERATOR[1] || ch == SEPERATOR[0] || ch == SEPERATOR[2];
    }

    private boolean isLineSeperator(final char ch) {
      return ch == SEPERATOR[1] || ch == SEPERATOR[2];
    }

    public String next() throws IOException {
      stringBuilder.setLength(0);
      while (true) {
        int c = bufferedReader.read();
        if (c == -1) {
          return null;
        }
        char ch = (char) c;
        if (!isAnySeperator(ch)) {
          stringBuilder.append(ch);
          break;
        }
      }
      while (true) {
        int c = bufferedReader.read();
        char ch = (char) c;
        if (c == -1 || isAnySeperator(ch)) {
          break;
        }
        stringBuilder.append(ch);
      }
      return stringBuilder.toString();
    }

    public String nextLine() throws IOException {
      stringBuilder.setLength(0);
      while (true) {
        final int c = bufferedReader.read();
        if (c == -1) {
          return null;
        }
        final char ch = (char) c;
        if (!isLineSeperator(ch)) {
          stringBuilder.append(ch);
          break;
        }
      }
      while (true) {
        int c = bufferedReader.read();
        char ch = (char) c;
        if (c == -1 || isLineSeperator(ch)) {
          break;
        }
        stringBuilder.append(ch);
      }
      return stringBuilder.toString();
    }

    public int nextInt() throws IOException {
      return Integer.parseInt(next(), 10);
    }

    public long nextLong() throws IOException {
      return Long.parseLong(next(), 10);
    }

    @Override
    public void close() throws IOException {
      bufferedReader.close();
    }
  }
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class skill {
public static void main (String args[]) throws IOException{
	Scanner sc = new Scanner (System.in);
int n = sc.nextInt();
int []a = new int [n];
for (int i = 0 ; i<n;i++)
	a[i]= sc.nextInt();
int s = 0 ;
int c  ;
for (int i =  0 ; i <n ; i++){
	c = 0 ;
	while (a[i]!= 0 ){
	s=(int) (Math.floor(Math.random() *7)+1);
	if (s<=a[i]){c++; a[i]= a[i]-s ;
	}
	System.out.println(c);
}

	}
}

static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
        public Scanner(String file) throws Exception {br = new BufferedReader(new FileReader(file));}
        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        public String nextLine()throws IOException{return br.readLine();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public double nextDouble() throws IOException {return Double.parseDouble(next());}
        public char nextChar()throws IOException{return next().charAt(0);}
        public Long nextLong()throws IOException{return Long.parseLong(next());}
        public boolean ready() throws IOException{return br.ready();}
        public void waitForInput() throws InterruptedException {Thread.sleep(3000);}
    }
}

import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Solution implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    // solution

    public static int rollDice(int n){
        int rolls = 0;
        int leftOver = 0;

        for (int i = 7; i >= 2; i--){
            leftOver = n % i;
            rolls = rolls + (n - leftOver) / i;
            n = leftOver;
        }
        return rolls;
    }

    void solve() throws IOException {
        int T = readInt();
        int num = 0;
        //reading input data

        for (int i = 0; i < T; i++){
          num = readInt();
          System.out.println(rollDice(num));
            //String result = searchXY(l, r);
        }

    }

}

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a=scan.nextInt();
        for(int i = 0;i < a; i++){
            int b = scan.nextInt();
            int sum = 0;
            if(b >= 7){
                int t=b/7;
                sum+=t;
                b=b-t*7;;
            }
            if(b >= 6){
                int t = b/6;
                b=b-t;
                sum+=t*6;
               //System.out.println(b);
            }
            if(b >= 5){
                int t=b/5;
                b=b-t*5;
                sum+=t;
            }
            if(b >= 4){
                int t=b/4;
                b=b-t*4;
                sum+=t;
            }
            if(b >= 3){
                int t=b/3;
                b=b-t*3;
                sum+=t;
            }
            if(b>=2){
                int t=b/2;
                b=b-t*2;
                sum+=t;
            }
            System.out.println(sum);
        }

    }
}

//package Codef;

import java.util.Scanner;

public class A_1093 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int t = s.nextInt();
		for (int i = 0; i < t; i++) {
             int q = s.nextInt();
             System.out.println(q%7 + q/7);
		}
	}

}

// package EducationalRoundsPracticw;
import java.io.*;
import java.util.*;

/*
    Author - Ribhav
    MADE ON - 12/16/2018
*/

public class CF1093A {

    static FastReader s;
    static PrintWriter out;
    static String INPUT = "4\n" +
            "2\n" +
            "13\n" +
            "37\n" +
            "100\n";

    public static void main (String[] args) {
        long time = System.currentTimeMillis();
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        out = new PrintWriter(System.out);
        s = new FastReader(oj);
        int t = s.nextInt();
        while(t-- > 0) {
            int x = s.nextInt();
            if(x % 2 == 0){
                System.out.println(x/2);
            } else {
                int ans = (x-3)/2;
                out.println(ans+1);
            }
        }

        if (!oj) {
            System.out.println(Arrays.deepToString(new Object[] { System.currentTimeMillis() - time + " ms" }));
        }
        out.flush();
    }

    private static class FastReader {
        InputStream is;

        public FastReader(boolean onlineJudge) {
            is = onlineJudge ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        }

        byte[] inbuf = new byte[1024];
        public int lenbuf = 0, ptrbuf = 0;

        int readByte() {
            if (lenbuf == -1)
                throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = is.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0)
                    return -1;
            }
            return inbuf[ptrbuf++];
        }

        boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                ;
            return b;
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        char nextChar() {
            return (char) skip();
        }

        String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        String nextLine() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while ((!isSpaceChar(b) || b == ' ')) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        char[] next(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        char[][] nextMatrix(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++)
                map[i] = next(m);
            return map;
        }

        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        int[][] next2DInt(int n, int m) {
            int[][] arr = new int[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextIntArray(m);
            }
            return arr;
        }

        long[][] next2DLong(int n, int m) {
            long[][] arr = new long[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLongArray(m);
            }
            return arr;
        }

        int[] shuffle(int[] arr) {
            Random r = new Random();
            for (int i = 1, j; i < arr.length; i++) {
                j = r.nextInt(i);
                arr[i] = arr[i] ^ arr[j];
                arr[j] = arr[i] ^ arr[j];
                arr[i] = arr[i] ^ arr[j];
            }
            return arr;
        }

        int[] uniq(int[] arr) {
            Arrays.sort(arr);
            int[] rv = new int[arr.length];
            int pos = 0;
            rv[pos++] = arr[0];
            for (int i = 1; i < arr.length; i++) {
                if (arr[i] != arr[i - 1]) {
                    rv[pos++] = arr[i];
                }
            }
            return Arrays.copyOf(rv, pos);
        }
    }
}

import java.util.Scanner;

public class cude {
    public static void main(String[] args) {
        Scanner jin = new Scanner(System.in);

        int n = jin.nextInt();
        int sum = 0;

        for (int t = 0; t < n; t++) {
            int x = jin.nextInt();
            for (int i = 7; i >= 2; i--) {
                sum += (x / i);
                x = x % i;
            }

            System.out.println(sum);
        }
    }
}

import java.util.Scanner;

/**
 * Created by jai on 15/12/18.
 */
public class p1093a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            int k = sc.nextInt();
            int n = k / 2 ;
            System.out.print(n);
        }
    }
}

import java.util.*;
public class dice_rolling {
public static void main(String args[])
{
	Scanner in=new Scanner(System.in);
	int t,n,sum;
	t=in.nextInt();
	while(--t>=0)
	{
		n=in.nextInt();
		sum=n/2+n%2;
	}
}
}

import java.awt.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class day7 {
public static void main(String[] args) {
	Scanner s=new Scanner(System.in);
	String line=s.nextLine();
	int n=Integer.parseInt(line);
	int c=0;
	int[]res=new int[n];
	for (int i = 0; i < n; i++) {
		line=s.nextLine();
		int num=Integer.parseInt(line);
		while(num>8) {
			num-=7;
			c++;
		}
		System.out.println(num);
		while(num>5) {
			num-=5;
			c++;
		}
		System.out.println(num);
		while(num>3) {
			num-=2;
			c++;
		}
		while(num>=3) {
			num-=3;
			c++;
		}
		while(num>=2) {
			num-=2;
			c++;
		}
		if(num==0) {
			res[i]=c;
		}c=0;
	}
	for (int i = 0; i <n; i++) {
		System.out.println(res[i]);
	}

}

}

import java.util.*;
public class Solution{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-- > 0){
            int n = sc.nextInt();
            int sum=0,ans=0;
            int die=7;
            while(n>=2){
                int temp = n / die;
                if(temp > 0){
                    ans += n/die;
                    n = n%die;
                }
                else{
                    die--;
                }

            }
            System.out.println(ans);
        }
        }
}

import java.util.Scanner;

public class A1093 {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();

        for (int i = 0; i < t; i++){
            int x = scan.nextInt();
            if(x % 2 == 0) System.out.println(x/2);
            else System.out.println(x/2 + 1);
        }

    }
}

import java.util.*;
public class ff
{public static void main(String ar[])
{Scanner sc=new Scanner(System.in);

    int t=sc.nextInt();

   while(t-->0)
   {int ans=0;
       int x=sc.nextInt();
       int a[]={0,2,3,4,5,6,7};
       int dp[][]=new int[6+1][x+1];
       for(int i=1;i<=6;i++)
       for(int j=1;j<=x;j++)
       {  // System.out.println(j);

           if(j%a[i]==0){dp[i][j]=j/a[i];continue;}
           if(a[i]>j)dp[i-1][j]=0;
           else if(a[i]==j){dp[i][j]=1;}
           else
           {
               if(j-a[i]>0&&dp[i][j-a[i]]>0)dp[i][j]=1+dp[i][j-a[i]];

           }
           if(dp[i][j]==0)dp[i][j]=dp[i-1][j];
           if(j==x&&dp[i][j]!=0){ans=dp[i][j];

           break;}

       }
        System.out.println(ans);

   }}}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class A {
	public static void main(String[] args) throws Exception {
		int[] X = new int[101];
		X[2] = 1;
		for (int i = 2; i < X.length; i++) {
			for (int j = 2; j <= 7; j++) {
				if (i + j < X.length)
					X[i + j] = X[i] + 1;
			}
		}

		int t = sc.nextInt();
		while (t-- > 0) {
			System.out.println(X[sc.nextInt()]);
		}
	}

	// **SOLUTION**
	public static void solve() throws Exception {
		int n = sc.nextInt();
		int[] arr = new int[n];

		for (int i = 0; i < arr.length; i++) {
			arr[i] = sc.nextInt();
		}
		System.out.println(8);
	}

	public static InputStreamReader r = new InputStreamReader(System.in);

	public static BufferedReader br = new BufferedReader(r);

	public static Scanner sc = new Scanner(System.in);
}

import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        int T = cin.nextInt();
        while(T-- > 0){
            int n = cin.nextInt();
            System.out.println(n % 2 == 0 ? n/2 : (n-3)/2-1);
        }
    }
}

import java.util.*;
public class mohammad {
    public static void main(String[] args) {
        //HashMap<Integer, Integer>map = new HashMap<>();
        //ArrayList<Integer> list = new ArrayList<>();
        /* --------------->Mohammad Abohasan<--------------- */
        Scanner sc = new Scanner (System.in);
        int t = sc.nextInt();
        while(t-->0){
            int n = sc.nextInt();
            int s = 0 ;
            while(n!=0){
                if (n > 7){
                    s += (int) n/7;
                    n -=7;}
                if(n <= 7 && n >= 2){
                    s++;
                    n =0 ;
                }
            }
            System.out.println(s);
        }
    }
}
/*
4
2
13
37
100
*/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args) {
        FastReader in = new FastReader();
        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            int q = in.nextInt();
            if (q < 2) {
                System.out.println(0);
                continue;
            }
            int ans = q / 7;
            ans += (q % 7 > 1) ? 1 : 0;
            System.out.println(ans);
        }

    }

}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        int[] data = new int[input.nextInt()];
        int x, count;
        for (int i = 0; i < data.length; i++) {
            x = data[i];
            count = 0;
            while (x > 0) {
                count++;
                x = x - 7;
            }
            System.out.println(count);
        }

    }
}

import java.util.*;
public class a{
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		int t=in.nextInt();

		while(t--!=0){
			int divisor=in.nextInt();
			int count=0;

			for(int x=7;x>=2;x--){
				count=count+(divisor/x);
				divisor=divisor%x;
			//	System.out.println(divisor);
			}
			System.out.println(count);

		}
	}
}

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int t = sc.nextInt();
		for (int tc = 0; tc < t; tc++) {
			int x = sc.nextInt();

			System.out.println(solve(x));
		}

		sc.close();
	}

	static int solve(int x) {
		return x / 2 + (x % 2 == 0 ? 0 : 1);
	}
}

import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt();
		for (; t > 0; t--) {
			int x = scan.nextInt();
			System.out.print((x / 6) + 1);
		}
		scan.close();
	}
}

import java.util.Scanner;

public class cude {
    public static void main(String[] args) {
        Scanner jin = new Scanner(System.in);
        int n = jin.nextInt();
        int sum = 0;
        for (int t = 0; t < n; t++) {
            int x = jin.nextInt();
            for (int i = 7; i >= 2; i--) {
                sum += x / i;
                x = x % i;
            }

            System.out.println(sum);
        }
    }
}

/**
 * Created by Rukshar Alam on 10/1/2019.
 */
import java.util.Scanner;
public class DiceRolling1093A {
    public static void main(String[] args) {
        int t,n;
        Scanner input = new Scanner(System.in);
        t = input.nextInt();
        for(int t_ = 0;t_<t;t_++){
            int x = input.nextInt();
            int answer = 0;
            if(x%2 ==0){
                answer=x/2;
            }
            else{
                x-=3;
                answer++; //the first roll is 3 and x will be even now
                answer = x/2;
            }
            System.out.println(answer);
        }

    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int[] arr = new int[t];
        for(int i = 0; i < arr.length;i++){
            arr[i] = sc.nextInt();
        }

        for(int i = 0; i < arr.length;i++){
            arr[i] = checkNumberOfSteps(arr[i]);
        }
        for(int i = 0; i < arr.length;i++){
//            System.out.println(arr[i]);
        }
        System.out.println(36/7);

    }

    public static int checkNumberOfSteps(int num) {
        int result = 0;
        for(int i = 7;i >= 2;i--){
            if(num == 0)
                break;
            if(num == 1){
                result++;
                break;
            }
            else if(num >= i){
                result += num / i;
                num = num % i;
            }
        }
        return result;
    }
}

import java.io.*;
public class Main {
    static PrintWriter pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static void main(String[] args) throws IOException {
        BufferedReader bf=new BufferedReader(new InputStreamReader( System.in));
        int t=Integer.parseInt(bf.readLine()),query;
        for (int j = 0; j <t ; j++) {
          query=Integer.parseInt(bf.readLine());
            int sol=0;
            for (int i = 7; i >=2; i--) {
                if (query/i!=0) {
                    sol += (query % i == (i - 1)) ? 0 : (query / i);
                    query -= sol * i;
                }
                if (query==0)break;
            }
          pw.write(sol+"\n");
        }
        pw.flush(); }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.*;
import java.lang.*;

public class Solution
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s = new FastReader();
        int T = s.nextInt();
        int N;
         Vector<Integer> v = new Vector<Integer>();
         for(int i = 2 ; i< 8 ;i++){
            v.add(i);
         }

        for(int i = 0 ; i < T;i++){
            N = s.nextInt();
            if( v.indexOf(N) >= 0){
                System.out.println("1");
            }

            int x ;
            x = N/7 ;
            System.out.println(x+1);

        }

        //System.out.println("Hello World!");
    }
}

//package com.company;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
//import java.nio.file.Paths;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        // write your code here
        // BufferedReader s=new BufferedReader(new InputStreamReader(System.in));
    BufferedReader s=new BufferedReader(new InputStreamReader(System.in));    StringBuilder sb = new StringBuilder();
    // Scanner s=new Scanner(System.in);
     int n=Integer.parseInt(s.readLine());
     while(n-->0){
         int t=Integer.parseInt(s.readLine());int ans=0;
            ans+=t/7;
            t%=7;
            ans+=t/6;
            t%=6;
         ans+=t/5;
         t%=5; ans+=t/4;
         t%=4; ans+=t/3;
         t%=3; ans+=t/2;
         t%=2;
         System.out.println(ans);
     }
        System.out.println(sb.toString());

    }  }

class Student
{
    int rollno;
    int color;

    // Constructor
    public Student(int rollno, int color)
    {
        this.rollno = rollno;

        this.color=color;}
    // Used to print student details in main()
    public String toString()
    {
        return this.rollno + " " ;
    }
}

class Sortbyroll implements Comparator<Student>
{
    // Used for sorting in ascending order of
    // roll number
    public int compare(Student a, Student b)
    {
        return a.color - b.color;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class G {
	public static void main(String[] args) {
		try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String linea;
            linea = br.readLine();
            int t = Integer.parseInt(linea);
            int h = 0;
            int k = 0;
            for(int i = 0; i < t; i++) {
            	linea = br.readLine();
                int x = Integer.parseInt(linea);
                if(x <= 7 && x >= 2) {
                    System.out.println(1);
                }else {
                    while(h != x) {
                        h = (int) (h + (((7) * Math.random()) + 2));
                        k++;
                        if(h > x) {
                            h = 0;
                            k = 0;
                        }
                    }
                    System.out.println(k);
                }
            }

	} catch (IOException e) {
	    e.printStackTrace();
	}

	}

}

import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        ArrayList<Integer> nums = new ArrayList<>();
        ArrayList<Integer> ans = new ArrayList<>();
        ArrayList<Integer> list = new ArrayList<>();
        for(int i = 2; i <= 7; i++){
            list.add(i);
        }
        for(int i = 0 ; i < n; i++){
            int a = sc.nextInt();
            if(list.contains(a)){
                ans.add(1);
            }else {
                nums.add(a);
            }
        }

        for(int i = 0; i < nums.size(); i++){
            int a = nums.get(i);
            int c = 0;
            while(!list.contains(a)){
                a -= 2;
                c++;
            }
            ans.add(c);
        }

        for(int i = 0; i < ans.size(); i++){
            System.out.println(ans.get(i));
        }

    }

}

import java.util.*;
public class Solution{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-- > 0){
            int n = sc.nextInt();
            int sum=0,ans=0;
            int die=7;
            while(n>=2){
                int temp = n / die;
                if(temp > 0){
                    ans += n/die;
                    n = n%die;
                }
                else{
                    die--;
                }

            }
            System.out.println(ans);
        }
        }
}

import java.util.*;
public class dice_rolling {
public static void main(String args[])
{
	Scanner in=new Scanner(System.in);
	int t,n,sum;
	t=in.nextInt();
	while(--t>=0)
	{
		n=in.nextInt();
		sum=n/2+n%2;
	}
}
}

import java.util.Scanner;
public class DiceRolling {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt();
		int[] a = new int[6];

		for ( int u =1 ;u<=t ;u++) {
			int x = scan.nextInt();
			System.out.println((int)Math.ceil(x/7));
		}
	}
}

import java.math.*;
import java.util.*;
import java.util.*;

public class Z {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for (int q = 0; q < t; q++) {
			int x = sc.nextInt();
			int y= x / 7;
			if ( x% 7 == 0) {
				System.out.println(x);
			}else {
				System.out.println(x+1);
			}

		}

	}
}

import java.util.*;

public class DiceRolling
{
    public static void main(String[] args)
    {
        Scanner input = new Scanner( System.in );

        int q = input.nextInt();

        System.out.println( q / 2 );
    }
}

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int t=scan.nextInt();
        for (int i = 0; i <t ; i++) {
            int x=scan.nextInt();
            System.out.println(x);
        }

    }
}

import java.awt.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class day7 {
public static void main(String[] args) {
	Scanner s=new Scanner(System.in);
	String line=s.nextLine();
	int n=Integer.parseInt(line);
	int c=0;
	int[]res=new int[n];
	for (int i = 0; i < n; i++) {
		line=s.nextLine();
		int num=Integer.parseInt(line);
		while(num>3) {
			num-=2;
			c++;
		}
		while(num>=3) {
			num-=3;
			c++;
		}
		if(num==0) {
			res[i]=c;
		}c=0;
	}
	for (int i = 0; i <n; i++) {
		System.out.println(res[i]);
	}

}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public class Solution
{

    public static void main(String[] args) throws IOException
    {

       BufferedReader br = new BufferedReader(
                              new InputStreamReader(System.in));

        int n=Integer.parseInt(br.readLine());

        for(int i=0;i<n;i++){
            int num=Integer.parseInt(br.readLine());
        int ans=0;
        int k=num%10;
        int d=num-k;
        if(k>=2 && k<=7){
            ans++;
            ans=ans+(d/5);
        }else if(k>8){
            ans=ans+2;
            ans=ans+(d/5);
        }
        else if(k==0){
            ans=ans+(d/5);

        }else if(k==1){
            ans=ans+1;
            d=d-5;
            ans=ans+(d/5);
        }
        System.out.println(ans);
        }

}}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int nmb;
        int nmblan;
        int cmp=1;
        nmb=sc.nextInt();
        for(int i=0;i<nmb;i++){
            nmblan=sc.nextInt();
            if( nmblan>7){
            while(nmblan>7){
                nmblan=nmblan-7;
                cmp=cmp+1;
            }
            System.out.println(cmp);
        }
            else System.out.println(1);
        }

    }
}

import java.util.Scanner;

/**
 * Created by jai on 15/12/18.
 */
public class p1093a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            int k = sc.nextInt();
            int n = k / 7 ;
            if(k % 7 != 0)
                n++;
            System.out.print(n);
        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        int[] data = new int[input.nextInt()];
        int x, count;
        for (int i = 0; i < data.length; i++) {
            x = data[i];
            count = 0;
            while (x > 0) {
                count++;
                x = x - 7;
            }
            System.out.println(count);
        }

    }
}

import java.util.*;

public class Solution {

    public static int getCount(int num) {

        return 5;
    }

    public static void main(String args[]){

        Scanner input = new Scanner(System.in);
        int testCases = input.nextInt();
        for(int index=0; index < testCases; index++){
            int num = input.nextInt();
            System.out.println(getCount(num));
        }

    }

}

import java.io.*;
public class Main {
    static PrintWriter pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static void main(String[] args) throws IOException {
        BufferedReader bf=new BufferedReader(new InputStreamReader( System.in));
        int t=Integer.parseInt(bf.readLine()),query;
        for (int j = 0; j <t ; j++) {
          query=Integer.parseInt(bf.readLine());
            int sol=0;
            for (int i = 7; i >=2; i--) {
                if (query/i!=0) {
                    sol += (query % i == (i - 1)) ? 0 : (query / i);
                    query -= sol * i;
                }
                if (query==0)break;
            }
          pw.write(sol+"\n");
        }
        pw.flush(); }
}

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int t=scan.nextInt();
        for (int i = 0; i <t ; i++) {
            int x=scan.nextInt();
            System.out.println(x-1);
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Twinkle Twinkle Little Star
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ADiceRolling solver = new ADiceRolling();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADiceRolling {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int queries = in.nextInt();
            while (queries-- != 0) {
                int points = in.nextInt();
                int min = Integer.MAX_VALUE;
                int index = 0;
                for (int i = 2; i <= 7; i++) {
                    int difference = Math.abs(points - i);
                    if (min > difference) {
                        min = difference;
                        index = i;
                    }

                }
                out.println("Dice : " + index);
                int check = points / index;

                out.println(check);

            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    static int coins[] = {2, 3, 4, 5, 6, 7};
    static long memo[][];

    static long dp(int id, int money) {
        long ans = 0;
        if (money == 0) {
            return 1;
        }
        if (id == coins.length || money < 0) {
            return 0;
        }
        if (memo[id][money] != -1) {
            return memo[id][money];
        } else {
            ans += dp(id + 1, money) + dp(id, money - coins[id]);
        }
        return memo[id][money] = ans;
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner();
        memo = new long[6][8000];
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < 8000; j++) {
                memo[i][j] = -1;
            }
        }
        int n = Integer.parseInt(sc.next());
        for (int i = 0; i < n; i++) {
            System.out.println(dp(0, Integer.parseInt(sc.next())));
        }

    }

    public static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int[] arr = new int[t];
        for(int i = 0; i < arr.length;i++){
            arr[i] = sc.nextInt();
        }

        for(int i = 0; i < arr.length;i++){
            arr[i] = checkNumberOfSteps(arr[i]);
        }
        for(int i = 0; i < arr.length;i++){
            System.out.println(arr[i]);
        }

    }

    public static int checkNumberOfSteps(int num) {
        int result = 0;
        for(int i = 7;i >= 2;i--){
            if(num == 0)
                break;
            else if(num >= i){
                result += num / i;
                num = num % i;
            }
        }
        return result;
    }
}

import java.util.Scanner;

public class cude {
    public static void main(String[] args) {
        Scanner jin = new Scanner(System.in);
        int n = jin.nextInt();
        int sum = 0;
        for (int t = 0; t < n; t++) {
            int x = jin.nextInt();
            for (int i = 7; i >= 2; i--) {
                sum += x / i;
                x = x % i;
            }

            System.out.println(sum);
        }
    }
}

import java.util.*;
public class A {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();int c=0;
		for (int i=0;i<t;i++) {
			int a=sc.nextInt();
			if(a==2||a==3||a==4||a==5||a==6||a==7)
				c=1;
			else {
				c=0;

					while(a>7){
						a-=7;
						c++;
					}
					while(a>=6){
						a-=6;
						c++;
					}
					while(a>=5){
						a-=5;
						c++;
					}
					 while(a>=4){
						a-=4;
						c++;
					}
					while(a>=3){
						a-=3;
						c++;
					}
					while(a>=2){
						a-=2;
						c++;
					}
				}
				System.out.println(c);
		}

	}

}

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main implements Runnable, AutoCloseable {
    Scanner in = new Scanner(new BufferedInputStream(System.in));
    PrintStream out = new PrintStream(new BufferedOutputStream(System.out));

    @Override
    public void run() {
        int t = in.nextInt();
//        int t = 1;
        for (int i = 0; i < t; i++) {
            doOnce();
        }
    }

    private void doOnce() {
        out.print(in.nextInt() / 2);
    }

    //        if (test(n, m, k)) {
    //            out.println("YES");
    //        } else {
    //            out.println("NO");
    //        }

    public static void main(String[] args) {
        try (Main main = new Main()) {
            main.run();
        }
    }

    @Override
    public void close() {
        out.close();
    }
}

import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;

/**
 *
 * @author sagai
 */
public class Mishka {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       int n,x,sum,i=0;
       ArrayList<Integer> a=new ArrayList<>();
       Scanner s=new Scanner(System.in);
       n=s.nextInt();
       Random rand=new Random();
       while(n!=0)
       {
       x=s.nextInt();
       sum=0;
       while(sum!=x)
       {
       sum+= rand.nextInt(5) + 2;
       i++;
       if(sum>x){i=0;sum=0;}
       }
       a.add(i);n--;

       }
       for(int xx:a)System.out.println(xx);
    }

}

import java.math.*;
import java.util.*;
import java.util.*;

public class Z {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for (int q = 0; q < t; q++) {
			int x = sc.nextInt();
			int y= x / 7;
			if ( x% 7 == 0) {
				System.out.println(x);
			}else {
				System.out.println(x+1);
			}

		}

	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.*;
import java.lang.*;

public class Solution
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s = new FastReader();
        int T = s.nextInt();
        int N;
         Vector<Integer> v = new Vector<Integer>();
         for(int i = 2 ; i< 8 ;i++){
            v.add(i);
         }

        for(int i = 0 ; i < T;i++){
            N = s.nextInt();
            if( v.indexOf(N) >= 0){
                System.out.println("1");
                break;
            }

            int x ;
            x = N/7 ;
            System.out.println(x+1);

        }

        //System.out.println("Hello World!");
    }
}

import java.util.Scanner;

public class DiceRolling_1093A {
    public static int numRolls(int x){
        if(x<=1){
            return 0;
        }
        if(x>=2 && x<=7){
            return 1;
        }
        return 1+numRolls(x-7);
    }
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        for(int i=0; i<n; i++){
            System.out.println(numRolls(s.nextInt()));
        }
    }
}

import java.awt.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class day7 {
public static void main(String[] args) {
	Scanner s=new Scanner(System.in);
	String line=s.nextLine();
	int n=Integer.parseInt(line);
	int c=0;
	int[]res=new int[n];
	for (int i = 0; i < n; i++) {
		line=s.nextLine();
		int num=Integer.parseInt(line);
		while(num>8) {
			num-=7;
			c++;
		}
		while(num>5) {
			num-=5;
			c++;
		}
		while(num>3) {
			num-=2;
			c++;
		}
		while(num>=3) {
			num-=3;
			c++;
		}
		while(num>=2) {
			num-=2;
			c++;
		}
		if(num==0) {
			res[i]=c;
		}c=0;
	}
	for (int i = 0; i <n; i++) {
		System.out.println(res[i]);
	}

}

}

import java.util.*;

public class Solution {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        while (t-- > 0) {
            int num = 0;
            System.out.println(num / 2 );
        }
    }
}

import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author anhnth37
 */
public class A_1093 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int t = input.nextInt();
        for (int i = 0; i < t; i++) {
            int x = input.nextInt();
            if (x < 8) {
                System.out.println(x);
            } else if (x == 8) {
                System.out.println(2);
            } else {
                int division = x / 7;
                int modulus = x% 7;
                if (modulus == 0) {
                    System.out.println(division);
                } else {
                    System.out.println(division + 1);
                }
            }
        }
    }
}

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a=scan.nextInt();
        for(int i = 0;i < a; i++){
            int b = scan.nextInt();
            int sum = 0;
            if(b >= 7){
                int t=b/7;
                sum+=t;
                b=b-t*7;
            }
           // System.out.println(b);
            if(b >= 6){
                int t = b/6;
                b=b-t*6;
                sum+=t;
               //System.out.println(b);
            }
            //System.out.println(b);
            if(b >= 5){
                int t=b/5;
                b=b-t*5;
                sum+=t;
            }
            if(b >= 4){
                int t=b/4;
                b=b-t*4;
                sum+=t;
            }
            if(b >= 3){
                int t=b/3;
                b=b-t*3;
                sum+=t;
            }
            if(b>=2){
                int t=b/2;
                b=b-t*2;
                sum+=t;
            }
            System.out.println(sum);
        }

    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf182 implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Cf182(),"Main",1<<27).start();
	}

	public static long gcd(long a, long b)
	{
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	//  array sorting by colm
public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override
          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	// gcd

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}
	// fibonaci
	static int fib(int n)
    {
        int a = 0, b = 1, c;
        if (n == 0)
            return a;
        for (int i = 2; i <= n; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return b;
    }

// sort a string
    public static String sortString(String inputString)
    {

        char tempArray[] = inputString.toCharArray();

        Arrays.sort(tempArray);

        return new String(tempArray);
    }
    // pair function

    // list.add(new Pair<>(sc.nextInt(), i + 1));
    //     Collections.sort(list, (a, b) -> Integer.compare(b.first, a.first));
    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {}

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }
    private static int next(ArrayList<Integer> arr, int target)
    {
        int start = 0, end = arr.size() - 1;

        int ans = -1;
        while (start <= end) {
            int mid = (start + end) / 2;

            if (arr.get(mid) <= target) {
                start = mid + 1;
            }
            else {
                ans = mid;
                end = mid - 1;
            }
        }
        return ans;
    }

    public static String LCS(char[] x, char[] y)
    {
      String[][] table= new String[x.length+1][y.length+1];
          for(int i=0;i<=x.length;i++)
          {
              for(int j=0;j<=y.length;j++)
              {
                if(i==0 || j==0)
                    table[i][j] = "";
                else if(x[i-1]==y[j-1])
                    table[i][j] = table[i-1][j-1]+Character.toString(x[i-1]);
                else
                {
                    int p = (table[i-1][j]).length();
                    int q = (table[i][j-1]).length();
                    if(p>q)
                        table[i][j] = table[i-1][j];
                    else
                       table[i][j] = table[i][j-1];
                }
            }

          }
         return table[x.length][y.length];
    }

    public static int primeFactors(long n)
    {
        int ans = -1;

        while (n%2==0)
        {
            ans = Math.max(2,ans);
            n /= 2;
        }

        for (int i = 3; i <= Math.sqrt(n); i+= 2)
        {

            while (n%i == 0)
            {
               ans = Math.max(ans,i);
                n /= i;
            }
        }

        if (n > 2)
            return (int)n;
        return ans;
    }
    static boolean isPowerOfTwo(int n)
    {
        if(n==0)
        return false;

    return (int)(Math.ceil((Math.log(n) / Math.log(2)))) ==
           (int)(Math.floor(((Math.log(n) / Math.log(2)))));
    }
	public void run()
	{
		InputReader sc = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int t = sc.nextInt();
		while(t--!=0)
		{
		int n = sc.nextInt();
	    long ans = 0;
	    ans += n/7;
	    n = n%7;
	    ans += n/6;
	    n = n%6;
	    ans += n/5;
	    n = n%5;
	    ans += n/4;
	    n = n%4;
	    ans += n/3;
	    n = n%3;
	    ans += n/2;
	    n = n%2;
	    System.out.println(ans);
		}
	}
}

import java.util.Scanner;

public class diceRolling {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		System.out.println((int) Math.ceil(n / 7.0));
	}
}

/**
 * ******* Created  on 17/1/20 12:15 AM*******
 */

import java.io.*;
import java.util.*;

public class A1039 implements Runnable {

    private static final int MAX = (int) (1E5 + 5);
    private static final int MOD = (int) (1E9 + 7);
    private static final long Inf = (long) (1E14 + 10);

    private void solve() throws IOException {
        int t = reader.nextInt();
        int[] numbers ={2,3,4,5,6,7};
        int[] flag =  new int[105];
        flag[0]=0;
        for(int i=2;i<105;i++){
            for(int j =0;j < 6 && numbers[j]<=i;j++){
                flag[i] = flag[i-numbers[j]]+1;
            }
        }
        while (t-- >0){
            int  x = reader.nextInt();
            writer.println(flag[x]);
        }
    }

    public static void main(String[] args) throws IOException {
        try (Input reader = new StandardInput(); PrintWriter writer = new PrintWriter(System.out)) {
            new A1039().run();
        }
    }

    StandardInput reader;
    PrintWriter writer;

    @Override
    public void run() {
        try {
            reader = new StandardInput();
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    interface Input extends Closeable {
        String next() throws IOException;

        default int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        default long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        default double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        default int[] readIntArray() throws IOException {
            return readIntArray(nextInt());
        }

        default int[] readIntArray(int size) throws IOException {
            int[] array = new int[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        default long[] readLongArray(int size) throws IOException {
            long[] array = new long[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextLong();
            }
            return array;
        }
    }

    private static class StandardInput implements Input {
        private final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        private StringTokenizer stringTokenizer;

        @Override
        public void close() throws IOException {
            reader.close();
        }

        @Override
        public String next() throws IOException {
            if (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                stringTokenizer = new StringTokenizer(reader.readLine());
            }
            return stringTokenizer.nextToken();
        }
    }
}

import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       for(int i=0;i<n;i++){
           int d=s.nextInt();
           int res=(d/2)+(d%2);
           System.out.println(res);
       }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner();
        int n=Integer.parseInt(sc.next());
        while(n-->0){
            int x=Integer.parseInt(sc.next());
            System.out.println(x/7);
        }

    }

    public static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}

//package ;
import java.io.*;
import java.util.*;

public class Problem_1093A
{
	public static void main(String[] args) throws IOException
	{
		Scanner sc = new Scanner();
		PrintWriter pw = new PrintWriter(System.out);
		int t=sc.nextInt();
		while(t-->0)
		{
			long ans=0;
			int x=sc.nextInt();
			for(int i=7;i>1;i--)
			{
				int div=x/i;
				ans+=div;
				x%=i;
			}
			pw.println(ans);
		}
		pw.close();
	}
	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		}

		int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		String nextLine() throws IOException {
			return br.readLine();
		}
		boolean hasnext() throws IOException{
			return br.ready();
		}

	}
}

import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;

/**
 *
 * @author sagai
 */
public class Mishka {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       int n,x,sum,i=0;
       ArrayList<Integer> a=new ArrayList<>();
       Scanner s=new Scanner(System.in);
       n=s.nextInt();
       Random rand=new Random();
       while(n!=0)
       {
       x=s.nextInt();
       sum=0;
       while(sum!=x)
       {
       sum+= rand.nextInt(5) + 2;i++;
       if(sum>x){i=0;sum=0;}
       }
       a.add(i);n--;

       }
       for(int xx:a)System.out.println(xx);
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class DiceRolling {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Reader reader = new Reader();
		int rounds = reader.nextInt();
		for(int i =0;i<rounds;i++) {
			int wantedNbr = reader.nextInt();
			int rolls = 0;
			int remainder = wantedNbr;
			//2,3,5,7, 4 6
			if(wantedNbr>=7) {
				rolls += remainder/7;
				remainder = remainder%7;

			}
			if(wantedNbr>=6) {
				rolls += remainder/6;
				remainder = remainder%6;
			}
			if(wantedNbr>=5) {
				rolls += remainder/5;
				remainder =+ remainder%5;
			}
			if(wantedNbr>=4) {
				rolls += remainder/4;
				remainder =+ remainder%4;
			}
			if(wantedNbr>=3) {
				rolls += remainder/3;
				remainder =+ remainder%3;
			}
			if(wantedNbr>=2) {
				rolls += remainder/2;
				remainder =+ remainder%2;
			}
			System.out.print(rolls);
	}
	}
	static class Reader
	{
		BufferedReader br;
		StringTokenizer st;

		public Reader()
		{
			br = new BufferedReader(new
					InputStreamReader(System.in));
		}

		String next()
		{
			while (st == null || !st.hasMoreElements())
			{
				try
				{
					st = new StringTokenizer(br.readLine());
				}
				catch (IOException e)
				{
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt()
		{
			return Integer.parseInt(next());
		}
	}
}