Mishka got a six-faced dice. It has integer numbers from $$$2$$$ to $$$7$$$ written on its faces (all numbers on faces are different, so this is an almost usual dice).Mishka wants to get exactly $$$x$$$ points by rolling his dice. The number of points is just a sum of numbers written at the topmost face of the dice for all the rolls Mishka makes.Mishka doesn't really care about the number of rolls, so he just wants to know any number of rolls he can make to be able to get exactly $$$x$$$ points for them. Mishka is very lucky, so if the probability to get $$$x$$$ points with chosen number of rolls is non-zero, he will be able to roll the dice in such a way. Your task is to print this number. It is guaranteed that at least one answer exists.Mishka is also very curious about different number of points to score so you have to answer $$$t$$$ independent queries.

The first line of the input contains one integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of queries. Each of the next $$$t$$$ lines contains one integer each. The $$$i$$$-th line contains one integer $$$x_i$$$ ($$$2 \le x_i \le 100$$$) — the number of points Mishka wants to get.

Print $$$t$$$ lines. In the $$$i$$$-th line print the answer to the $$$i$$$-th query (i.e. any number of rolls Mishka can make to be able to get exactly $$$x_i$$$ points for them). It is guaranteed that at least one answer exists.

NoteIn the first query Mishka can roll a dice once and get $$$2$$$ points.In the second query Mishka can roll a dice $$$3$$$ times and get points $$$5$$$, $$$5$$$ and $$$3$$$ (for example).In the third query Mishka can roll a dice $$$8$$$ times and get $$$5$$$ points $$$7$$$ times and $$$2$$$ points with the remaining roll.In the fourth query Mishka can roll a dice $$$27$$$ times and get $$$2$$$ points $$$11$$$ times, $$$3$$$ points $$$6$$$ times and $$$6$$$ points $$$10$$$ times.

import java.util.*
import kotlin.collections.ArrayList
//https://www.javatpoint.com/kotlin-smart-cast
fun main() {
    val read=Scanner(System.`in`);
    var test=read.nextInt();
    while((test--)>0){
        var x=read.nextInt();
        var cnt=0;
        if(x%2==1){
            x-=3;
            cnt+=1;
        }
        cnt+=x/2;
        println(cnt);
    }
}

import kotlin.math.sign

fun main() {
    repeat(readInt()) {
        val n = readInt()
        println(n / 7 +  (n % 7).sign)
    }
}

fun readInt() = readLine()?.toInt() ?: 0

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main() {
    val T = readInt()
    for (t in 0..T-1) {
        val n = readInt()
        println(n / 2)
    }
}

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

    internal var br = BufferedReader(InputStreamReader(System.`in`))
    internal var st: StringTokenizer? = null
    internal var out = PrintWriter(System.out)

    @Throws(IOException::class)
    private fun solve() {
        val t = nextInt()
        for (i in 0 until t) {
            val x = nextInt()
            out.println(x / 2)
        }
    }

    internal fun next(): String {
        while (st == null || !st!!.hasMoreTokens()) {
            st = StringTokenizer(br.readLine())
        }
        return st!!.nextToken()
    }

    @Throws(IOException::class)
    internal fun nextInt(): Int {
        return Integer.parseInt(next())
    }

    @Throws(IOException::class)
    internal fun nextLong(): Long {
        return java.lang.Long.parseLong(next())
    }

    @Throws(IOException::class)
    private fun run() {
        solve()
        out.close()
    }

        fun main(args: Array<String>) {
            run()
        }

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

object programkt {
    @JvmStatic
    fun main(args: Array<String>) {
        val inputStream = System.`in`
        val outputStream = System.out
        val `in` = InputReader(inputStream)
        val out = OutputWriter(outputStream)
        val solver = Problem()
        solver.solve(`in`, out)
        out.close()
    }

    internal class Problem {
        fun solve(`in`: InputReader, out: OutputWriter) {
            val t = `in`.readInt()
            val x = IntArray(t)
            for (i in 0 until t) x[i] = `in`.readInt()
            for (i in 0 until t) out.printLine(x[i] / 2)
        }
    }

    internal class InputReader(private val stream: InputStream) {
        private val buf = ByteArray(1024)
        private var curChar: Int = 0
        private var numChars: Int = 0
        private val filter: SpaceCharFilter? = null

        fun read(): Int {
            if (numChars == -1)
                throw InputMismatchException()
            if (curChar >= numChars) {
                curChar = 0
                try {
                    numChars = stream.read(buf)
                } catch (e: IOException) {
                    throw InputMismatchException()
                }

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

        fun readInt(): Int {
            var c = read()
            while (isSpaceChar(c))
                c = read()
            var sgn = 1
            if (c == '-'.toInt()) {
                sgn = -1
                c = read()
            }
            var res = 0
            do {
                if (c < '0'.toInt() || c > '9'.toInt())
                    throw InputMismatchException()
                res *= 10
                res += c - '0'.toInt()
                c = read()
            } while (!isSpaceChar(c))
            return res * sgn
        }

        fun readLong(): Long {
            var c = read()
            while (isSpaceChar(c))
                c = read()
            var sgn = 1
            if (c == '-'.toInt()) {
                sgn = -1
                c = read()
            }
            var res: Long = 0
            do {
                if (c < '0'.toInt() || c > '9'.toInt())
                    throw InputMismatchException()
                res *= 10
                res += (c - '0'.toInt()).toLong()
                c = read()
            } while (!isSpaceChar(c))
            return res * sgn
        }

        fun readString(): String {
            var c = read()
            while (isSpaceChar(c))
                c = read()
            val res = StringBuilder()
            do {
                res.appendCodePoint(c)
                c = read()
            } while (!isSpaceChar(c))
            return res.toString()
        }

        fun isSpaceChar(c: Int): Boolean {
            return filter?.isSpaceChar(c)
                ?: (c == ' '.toInt() || c == '\n'.toInt() || c == '\r'.toInt() || c == '\t'.toInt() || c == -1)
        }

        operator fun next(): String {
            return readString()
        }

        interface SpaceCharFilter {
            fun isSpaceChar(ch: Int): Boolean
        }
    }

    internal class OutputWriter {
        private val writer: PrintWriter

        constructor(outputStream: OutputStream) {
            writer = PrintWriter(BufferedWriter(OutputStreamWriter(outputStream)))
        }

        constructor(writer: Writer) {
            this.writer = PrintWriter(writer)
        }

        fun print(vararg objects: Any) {
            for (i in objects.indices) {
                if (i != 0)
                    writer.print(' ')
                writer.print(objects[i])
            }
        }

        fun printLine(vararg objects: Any) {
            print(*objects)
            writer.println()
        }

        fun close() {
            writer.close()
        }
    }
}

fun main() {
    val n = readInt()
    for (j in 1..n) {
        val v = readInt()
        println(v / 2)
    }
}

fun readln() = readLine()!!
fun readlnByte() = readln().toByte()
fun readlnShort() = readln().toShort()
fun readlnInt() = readln().toInt()
fun readlnLong() = readln().toLong()
fun readlnFloat() = readln().toFloat()
fun readlnDouble() = readln().toDouble()
fun readlnBigInt(radix: Int = 10) = readln().toBigInteger(radix)
fun readlnBigDecimal() = readln().toBigDecimal()

fun lineSequence(limit: Int = Int.MAX_VALUE) = generateSequence { readLine() }.constrainOnce().take(limit)
fun readlnStrings() = readln().split(' ')
fun readlnBytes() = readlnStrings().map { it.toByte() }
fun readlnShorts() = readlnStrings().map { it.toShort() }
fun readlnInts() = readlnStrings().map { it.toInt() }
fun readlnLongs() = readlnStrings().map { it.toLong() }
fun readlnFloats() = readlnStrings().map { it.toFloat() }
fun readlnDoubles() = readlnStrings().map { it.toDouble() }

fun readByteArray() = readlnStrings().run { ByteArray(size) { get(it).toByte() } }
fun readShortArray() = readlnStrings().run { ShortArray(size) { get(it).toShort() } }
fun readIntArray() = readlnStrings().run { IntArray(size) { get(it).toInt() } }
fun readLongArray() = readlnStrings().run { LongArray(size) { get(it).toLong() } }
fun readFloatArray() = readlnStrings().run { FloatArray(size) { get(it).toFloat() } }
fun readDoubleArray() = readlnStrings().run { DoubleArray(size) { get(it).toDouble() } }

fun readlnByteArray(n: Int) = ByteArray(n) { readlnByte() }
fun readlnShortArray(n: Int) = ShortArray(n) { readlnShort() }
fun readlnIntArray(n: Int) = IntArray(n) { readlnInt() }
fun readlnLongArray(n: Int) = LongArray(n) { readlnLong() }
fun readlnFloatArray(n: Int) = FloatArray(n) { readlnFloat() }
fun readlnDoubleArray(n: Int) = DoubleArray(n) { readlnDouble() }

fun readByteArray2d(rows: Int, cols: Int) = Array(rows) { readByteArray().also { require(it.size == cols) } }
fun readShortArray2d(rows: Int, cols: Int) = Array(rows) { readShortArray().also { require(it.size == cols) } }
fun readLongArray2d(rows: Int, cols: Int) = Array(rows) { readLongArray().also { require(it.size == cols) } }
fun readIntArray2d(rows: Int, cols: Int) = Array(rows) { readIntArray().also { require(it.size == cols) } }
fun readFloatArray2d(rows: Int, cols: Int) = Array(rows) { readFloatArray().also { require(it.size == cols) } }
fun readDoubleArray2d(rows: Int, cols: Int) = Array(rows) { readDoubleArray().also { require(it.size == cols) } }

fun isWhiteSpace(c: Char) = c in " \r\n\t"

// JVM-only targeting code follows next

// readString() via sequence is still slightly faster than Scanner
fun readString() = generateSequence { System.`in`.read().toChar() }
    .dropWhile { isWhiteSpace(it) }.takeWhile { !isWhiteSpace(it) }.joinToString("")

fun readByte() = readString().toByte()
fun readShort() = readString().toShort()
fun readInt() = readString().toInt()
fun readLong() = readString().toLong()
fun readFloat() = readString().toFloat()
fun readDouble() = readString().toDouble()
fun readBigInt(radix: Int = 10) = readString().toBigInteger(radix)
fun readBigDecimal() = readString().toBigDecimal()

fun readBytes(n: Int) = generateSequence { readByte() }.take(n)
fun readShorts(n: Int) = generateSequence { readShort() }.take(n)
fun readInts(n: Int) = generateSequence { readInt() }.take(n)
fun readLongs(n: Int) = generateSequence { readLong() }.take(n)
fun readFloats(n: Int) = generateSequence { readFloat() }.take(n)
fun readDoubles(n: Int) = generateSequence { readDouble() }.take(n)

import kotlin.math.sign

class DiceRolling {
    data class Problem(val id: Int, val target: Int)

    data class Solution(val count: Int) {
        override fun toString(): String {
            return "$count\n"
        }
    }

    fun readProblem(problemId: Int): Problem {
        return Problem(problemId, readLine()!!.toInt())
    }

    fun solveProblem(problem: Problem): Solution {
        return Solution(problem.target / 7 + (problem.target % 7).sign)
    }
}

fun main() {
    val diceRolling = DiceRolling()
    val n = readLine()!!.toInt()
    (1..n).map(diceRolling::readProblem)
        .map(diceRolling::solveProblem)
        .onEach(::print)
}

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main() {
    var T = readInt()
    while(T>0) {
        var x = readInt()
        println("%d".format(x/2))
        T--
    }

}

fun main(args : Array<String>) {
    val numberOfQueries = readLine()!!.toInt()

    for (i in 1..numberOfQueries) {
        println(readLine()!!.toInt() / 2)
    }
}

fun readInt(separator: Char = ' ') = readLine()!!.toInt()
fun main() {
    val n = readInt()
    for(i in 0 until n){
        val x = readInt()/2
        println("$x")
    }
}

fun x()=readLine()!!.toInt()
fun main()=repeat(x()){println(x()/2)}

fun main() {
    val n = readLine()!!.toInt()
    repeat(n) {
        val x = readLine()!!.toInt()
        val res = if (x > 7) {
            x/7 + 1
        } else 1
        println(res)
    }
}

import kotlin.math.min

val dp = IntArray(103)

fun main(){
    dp[0] = 0
    for(i in 1..100){
        dp[i] = Int.MAX_VALUE
        for(j in 2..7)
            if(i >= j && dp[i-j] != Int.MAX_VALUE)
                dp[i] = min(dp[i], 1 + dp[i-j])
    }
    val t = readLine()!!.toInt()
    repeat(t){
        val x = readLine()!!.toInt()
        println(dp[x])
    }
}

import java.util.*

fun main() {

    val scanner = Scanner(System.`in`)
    var t = scanner.nextInt()

    while (t > 0) {
        t--
        val num = scanner.nextInt()
        var idx=2
        while (idx<=7){
            val c = num % idx
            val c2 = num / idx
            if (c != 1) {
                if (c > 0) println(c2 + 1)
                else println(c2)
                break
            }
            idx++
        }
    }
}

fun main(args:  Array<String>)
{
val t=readLine()!!.toInt()
repeat(t)
{
val n=readLine()!!.toInt()

println(n/2);

}
}

fun main() {
    val n = Integer.valueOf(readLine()!!)

    repeat(n) {
        val x = Integer.valueOf(readLine()!!)
        if(x % 7 == 0) {
            println(x / 7)
        } else if(x % 7 == 1){
            println(x / 7 + 2)
        } else {
            println(x / 7 + 1)
        }
    }
}

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = readLine()!!.toInt()
    for(x in 0..n-1){
    	val tmp = readLine()!!.toInt()
    	if(tmp <= 6) println("1")
    	else{
    		println(tmp/6+1)
    	}
    }

}

fun main() {
    for (i in 1..r())
        println(r() / 2)
}

inline fun r() = readLine()!!.toInt()

fun main(){
    fun x()=readLine()!!.toInt()
    for(i in 1..x())println(x()/2)
}

fun readInt(): Int {
    return readLine()!!.toInt()
}

fun main() {
    val T = readInt()
    for(i in 1..T) {
        var result = 0
        var n = readInt()
        while(n > 0) {
            if(n % 7 == 1)
                n -= 4
            else if(n >= 7)
                n -= 7
            else
                n -= n % 7
            result++
        }
        println(result)
    }
}

import java.io.FileInputStream
import java.util.*

object programkt {
  @JvmStatic fun main(args: Array<String>) {
    if (args.size == 1)
      System.setIn(FileInputStream(args[0]))
    val sc = Scanner(System.`in`)
    val t = sc.nextInt()
    IntRange(1, t).forEach {
      val x = sc.nextInt()
      println(x / 2)
    }
  }
}

fun main(args : Array<String>) {
    val numberOfQueries = readLine()!!.toInt()

    for (i in 1..numberOfQueries) {
        val points = readLine()!!.toInt()

        if (points % 2 == 0) {
            println(points / 2)
        } else {
            println((points - 3) / 2 + 1)
        }
    }
}

fun main() {
    for (i in 1..readLine()!!.toInt()) {
        println(readLine()!!.toInt() / 2)
    }
}

import kotlin.math.sign

fun main() {
    repeat(readInt()) {
        val n = readInt()
        println(n / 7 +  (n % 7).sign)
    }
}

fun readInt() = readLine()?.toInt() ?: 0

//package com.happypeople.codeforces.c1093

import java.io.ByteArrayInputStream
import java.io.InputStream
import java.util.*

fun main(args: Array<String>) {
    try {
        A().run()
    } catch (e: Throwable) {
        A.log("" + e)
    }
}

class A {
    fun run() {
        val sc = Scanner(systemIn())
        val n=sc.nextInt()
        (1..n).forEach {
            val i=sc.nextInt()
            val rolls=if(i==2) 1 else i/3
            println("$rolls")
        }
    }

    companion object {
        var inputStr: String? = null

        fun systemIn(): InputStream {
            if (inputStr != null)
                return ByteArrayInputStream(inputStr!!.toByteArray())
            else
                return System.`in`
        }

        var printLog = false
        fun log(str: String) {
            if (printLog)
                println(str)
        }
    }
}

import java.util.Scanner

object programkt {
    @JvmStatic fun main(args:Array<String>) {
        val sc = Scanner(System.`in`)
        val t = sc.nextInt()
        for (i in 0 until t)
        {
            val x = sc.nextInt()
            if (x <= 7)
            {
                println(1)
            }
            else
            {
                println(x / 2)
            }
        }
    }
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    for (i in 1..n) {
        val t1 = readLine()!!.toInt()
        println(getCount(t1))
    }
}

fun getCount(x: Int): Int {
    var c = 0
    var s = x
    if (x % 2 != 0) {
        s -= 3
        c++
    }
    c += s / 2
    return c
}

fun main(args: Array<String>) {
    val t = readLine()!!.toInt()
    repeat(t) {
        val x = readLine()!!.toInt()
        println((x + 6) / 7)
    }
}

fun main() {
    val n = readLine()!!.toInt()
    for(i in 0 until n){
        val x = readLine()!!.toInt()
        println((x+6)/7)
    }
}

fun main(args: Array<String>){
    var t:Int = readLine()?.toInt()?:0
    for(i in 1..t)
    {
        var b:Int = readLine()?.toInt()?:0
        var result = b/2;
        println(result)
    }
}

fun main() {

    val solver = Solver()
//    val res = solver.solve(13)
//    print(res)
    val parsed: List<Int> = Parser().parse()
    val res = parsed.map { x -> solver.solve(x) }
    res.forEach{x-> println(x)}
}

class Solver {
    private val faces : List<Int> = listOf(2,3,4,5,6,7).reversed()

    fun solve(target: Int): Int {
        var currentTarget: Int = target
        var rollCount = 0
        while (currentTarget > 0) {
            val face = findNextFace(currentTarget)
            currentTarget -= face
            rollCount++
        }
        return rollCount
    }

    fun findNextFace(target : Int) : Int {
        val idx: Int = faces.size - 1
        var currentFace: Int = 0
        for (i: Int in 0..idx) {
            currentFace = faces[i]
            if (target >= currentFace) {
                return currentFace
            }
        }
        return currentFace
    }
}

class Parser {
    private fun lineSequence(limit: Int = Int.MAX_VALUE) = generateSequence { readLine() }.constrainOnce().take(limit)
    private fun readln() = readLine()!!
    private fun readlnInt() = readln().toInt()

    fun parse(): List<Int> {
        val queryNumber: Int = readlnInt()
        return lineSequence(queryNumber).map { x -> x.toInt() }.toList()
    }
}

/*
fun main(args: Array<String>) {
    val t = readLine()!!.toInt()
    repeat(t) {
        val x = readLine()!!.toInt()
        println((x + 6) / 7)
    }
}
*/
fun main(args: Array<String>){
    var i = 1;
    var t: Int =Integer.valueOf(readLine())
    repeat(t)
    {
        var x: Int =Integer.valueOf(readLine())
        println((x-1)/7 + 1)
    }
}

fun main() {
    val t = readLine()!!.toInt()
    repeat((1..t).count()) {
        val n = readLine()!!.toInt()
        println(n/7 + if(n.rem(7) == 0) 0 else 1 )
    }
}

fun main() {
    val n = readLine()!!.toInt()
    repeat (n) {
        val i = readLine()!!.toInt()
        println(1+i/7)
    }
}

fun main() {
   var n = readLine()!!.toInt()
   while (n > 0) {
      val t = readLine()!!.toInt()
      println(t / 2)
      n -= 1
   }
}

fun rollCount(score: Int, base: Int = 7): Int {
    if(score <= 7) {
        return 1
    }
    val ost = score % base
    val full = score / base
    return when(ost) {
        0 -> full
        1 -> (full-1) + rollCount(score - (full-1)*base, base-1)
        else -> full + 1
    }
}

fun main() {
    val count = readLine()!!.toInt()
    repeat(count) {
        val score = readLine()!!.toInt()
        println(rollCount(score))
    }
}

fun main(args: Array<String>)
{
val t= readLine()!!.toInt()
repeat(t)
{
val x= readLine()!!.toInt()
println(x/2)
}

}

import java.io.BufferedReader
import java.io.InputStreamReader

fun main() {
    BufferedReader(InputStreamReader(System.`in`)).use { reader ->
        val count = reader.readLine().toInt()
        reader.lineSequence()
            .take(count)
            .map {
                it.toInt() / 2
            }.joinToString(separator = "\n") {
                it.toString()
            }
            .let(::println)
    }
}

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main() {
    val T = readInt()
    val output = mutableListOf<String>()
    for (t in 0..T-1) {
        val n = readInt()
        output += "${n/2}"
    }
    println(output.joinToString("\n"))
}

fun main() {
    val numberOfQueries = readLine()!!.toInt()
    val output = mutableListOf<Int>()

    repeat(numberOfQueries) {
        val target = readLine()!!.toInt()

        val result = when {
            target < 8 -> 1
            target % 7 == 0 -> target / 7
            else -> ((target - (target % 7)) / 7) + 1
        }

        output.add(result)
    }

    output.forEach { x -> println(x) }
}

import java.io.BufferedReader
import java.io.File
import kotlin.system.measureTimeMillis

fun solve(input: BufferedReader) {
    val t = input.readLine().toInt()
    for (i in 0 until t) {
        val n = input.readLine().toInt()
        println(n / 2)
    }
}

fun main(args: Array<String>) {
    System.err.println("time = ${measureTimeMillis {
        solve(System.`in`.bufferedReader())
//        solve(File("a.out").`bufferedReader())
    }}ms")
}

import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)

    repeat(scanner.nextInt()){
        println(scanner.nextInt()/2)
    }
}

fun main(args : Array<String>) {
    val numberOfQueries = readLine()!!.toInt()

    for (i in 1..numberOfQueries) {
        val points = readLine()!!.toInt()

        if (points % 2 == 0) {
            println(points / 2)
        } else {
            println((points - 3) / 2 + 1)
        }
    }
}

fun main(arg: Array<String>){
	var n = readLine()!!.toInt()
	while (n > 0){
		val x = readLine()!!.toInt()
		val y = if(x.rem(7)==0) x/7 else x/7+1
		println(y)
		n = n - 1
	}
}

fun calcurate(sum: Int): Int {
    val quotient = sum / 7
    val mod = sum % 7 // 7で割った余り
    return when {
        /*
         * 1は出せないので割る数を減らす -> quotient - 1
         * 8余るので6で割る -> +1
         * 2余る -> +1
         * => quotient - 1 + 1 + 1
         */
        mod == 1 -> quotient  + 1
        /*
         * 2〜6余る -> +1
         */
        else -> quotient + 1
    }
}

fun dice(input: Sequence<String?>): String {
    return input.drop(1)
        .mapNotNull{it?.toInt()}
        .map(::calcurate)
        .joinToString("\n")
}

fun main(args: Array<String>) {
    print(dice(generateSequence(::readLine)))
}

import java.util.*
import java.io.*
fun main(args:Array<String>) {
	val sc = Scanner(System.`in`)
	// PrintWriter out=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	var x = sc.nextInt();
	while (x-- > 0)
	{
		val t = sc.nextInt();
		val ans:Int
		if (t % 2 == 0)
		  ans = t / 2
		else
		  ans = (t - 3) / 2 + 1
		println(ans)
		// x -= 1;
	 // out.write(ans);
	}
// out.close();
}

import kotlin.math.sign

fun main() {
    repeat(readInt()) {
        val n = readInt()
        println(n / 7 +  (n % 7).sign)
    }
}

fun readInt() = readLine()?.toInt() ?: 0

fun main(args: Array<String>) {
    val out = generateSequence(::readLine)
        .drop(1)
        .mapNotNull{it?.toInt()}
        .map{it / 7 + 1}
        .joinToString("\n")

    print(out)
}

fun main() {
    fun readInt() = readLine()!!.toInt()

    val numQueries = readInt()
    val sol = IntArray(numQueries)
    for (query in 0 until numQueries) {
        val x = readInt()
        sol[query] = x / 7 + if (x % 7 == 0) 0 else 1
    }
    print(sol.joinToString(System.lineSeparator()))
}

fun main() {
    val n = readLine()!!.toInt()
    repeat (n) {
        val i = readLine()!!.toInt()
        println(1+i/7)
    }
}

import java.util.*

fun main(args: Array<String>) {
        val scanner = Scanner(System.`in`)

        val n = scanner.nextInt()

        repeat(n){
            println(findNumberOfRoles(scanner.nextInt()))
        }
    }

    private fun findNumberOfRoles(q: Int): Int {
        return q/2
    }

import java.io.FileInputStream
import java.util.*

object programkt {
  @JvmStatic fun main(args: Array<String>) {
    if (args.size == 1)
      System.setIn(FileInputStream(args[0]))
    val sc = Scanner(System.`in`)
    val t = sc.nextInt()
    IntRange(1, t).forEach {
      val x = sc.nextInt()
      println(x / 2)
    }
  }
}

import java.util.Scanner
fun main() {
        val read = Scanner(System.`in`)
        var t = read.nextInt()
        //var t : Int = 3
        while (t-- != 0) {
            var n = read.nextInt()
            var ans : Int = 0
            var i : Int
            for (i in 7 downTo 2) {
                if (n % i == 0) {
                    ans = n / i
                } else if (n % i >= 2 && n % i < i) {
                    ans = n / i + 1
                }
            }
            println(ans)
        }

    }

/* https://codeforces.com/problemset/problem/1093/A */

fun main() {
    val numOfQueries = readLine()!!.toInt()
    for (i in 1..numOfQueries) {
        val targetPoints = readLine()!!.toInt()
        val numOfRolls = targetPoints / 7 + 1
        println(numOfRolls)
    }
}

fun main() {
    var t = readLine()!!.toInt()
    for (i in 1..t) {
        var number = readLine()!!.toInt()
        if (number % 2 == 0) {
            println(number / 2)
        } else {
            println((number - 1) / 2)
        }
    }
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    for (i in 0 until n) {
        val t = readLine()!!.toInt()
        if (t <= 7) {
            println(1)
            continue
        }
        val s = t / 7
        val rem = t % 7
        if (rem == 0) {
            println(s)
        } else {
            println(s + 1)
        }
    }
}

private fun readInt() = readLine()?.toInt()!!

private fun rollTry(point: Int) =
    if (point in 2..7) 1
    else (point / 6) + if (point % 6 != 0) 1 else 0

fun main() {

    val num = readInt()
    (1..num)
        .map { readInt() }
        .forEach { println(rollTry(it)) }
}

object programkt {

    @JvmStatic
    fun main(args: Array<String>) {
        val t = readLine()!!.toInt()

        for (i in 0 until t) {
            val x = readLine()!!.toInt()
            println(x / 2)
        }
    }

}

fun readLn() = readLine()!!
fun readInt() = readLn().toInt()

fun main() {
    val testCases = readInt()
    for (i in 1..testCases) {
        val n = readInt()
        println((n / 7) + 1)
    }
}

import java.util.*

fun main() {

    val scanner = Scanner(System.`in`)
    var t = scanner.nextInt()

    while (t > 0) {
        t--
        var num = scanner.nextInt()
        for (i in 2..7) {
            var c = num % i
            var c2 = num / i
            if (c != 1) {
                if (c > 0) println(c2 + 1)
                else println(c2)
                break
            }
        }
    }

}

fun main() {
    for (i in 1..readLine()!!.toInt()) {
        val r: Int = readLine()!!.toInt() / 2
        println(r)
    }
}

import java.util.Scanner

object programkt {
    @JvmStatic fun main(args:Array<String>) {
        val sc = Scanner(System.`in`)
        val t = sc.nextInt()
        for (i in 0 until t)
        {
            val x = sc.nextInt()
            if (x <= 7)
            {
                println(1)
            }
            else
            {
                println(x / 2)
            }
        }
    }
}

import kotlin.math.sign

data class Problem(val id: Int, val target: Int)

data class Solution(val count: Int) {
    override fun toString(): String {
        return "$count\n"
    }
}

fun readProblem(problemId: Int): Problem {
    return Problem(problemId, readLine()!!.trim().toInt())
}

fun solveProblem(problem: Problem): Solution {
    return Solution(problem.target / 7 + (problem.target % 7).sign)
}

fun main(args: Array<String>) {
    var n = readLine()!!.toInt()
    (1..n).map(::readProblem)
        .map(::solveProblem)
        .onEach(::print)
}

fun main() {
    val nQueries = readLine()!!.toInt()
    for (i in 0 until nQueries) {
        val value = readLine()!!.toInt()
        println(value / 7 + 1)
    }
}

/*
fun main(args: Array<String>) {
    val t = readLine()!!.toInt()
    repeat(t) {
        val x = readLine()!!.toInt()
        println((x + 6) / 7)
    }
}
*/
fun main(args: Array<String>){
    var i = 1;
    var t: Int =Integer.valueOf(readLine())
    repeat(t)
    {
        var x: Int =Integer.valueOf(readLine())
        println((x-1)/7 + 1)
    }
}

fun main(args: Array<String>) {
    var n = readLine()!!.toInt()
//    var arr2 = readLine()!!.split(" ").map { x -> x.toLong() }
//    var arr = readLine()!!.split(" ").map { x -> x.toLong() }

    for (a in 0 until n) {
        var count = readLine()!!.toInt()
        if (count < 8) println (1)
        else println(count / 7 + 1)
    }

}

fun main(args: Array<String>)
{
val t= readLine()!!.toInt()
repeat(t)
{
val x= readLine()!!.toInt()
println(x/2)
}

}

fun main() {
    repeat(readLine()!!.toInt()) {
        val n = readLine()!!.toInt();
        println("${n/2}");
    }
}

import java.io.File

class MyReader(fileName: String) {
    val file = File(fileName)

    val contents : List<String>?

    init {
        contents = try {
            file.readLines()
        } catch (e : Throwable) {
            null
        }
    }

    val line : String
    get() {
        return if (contents != null) {
            contents[pointer++]
        } else {
            readLine()!!
        }
    }

    var pointer = 0
}

var reader : MyReader = MyReader("src/inpsut.txt")

fun getLine() = reader.line
fun readInt() = getLine().toInt()
fun readInts() = getLine().split(" ").map { it.toInt() }

fun main() {
    val n = readInt()
    repeat(n) { i ->
        var num = readInt()
        var ans = 0
        if (num % 2 == 1) {
            ans = 1
            num -= 3
        }
        println(num / 2 + ans)
    }
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    for (i in 0 until n) {
        val x = readLine()!!.toInt()
            println(x/2)
    }
}

import java.util.*

fun main(args: Array<String>) {
    val input = Scanner(System.`in`)
    var rows = input.nextInt()
    var row = 0
    do {
        row = input.nextInt()
        if (row < 8) {
            println(1)
        } else {
            println(row / 2)
        }
        --rows
    } while(rows > 0)
}

fun main()
{
	var s= arrayOf(2,3,4,5,6,7)
	var t=readLine()!!.toInt()
	repeat(t)
	{   var c: Int=0
		var p: Int=readLine()!!.toInt()
		while (p>0)
			{
		       if(p>7)
				   {   p=p-s.random()
					   c++
							}
				else
				   {   c++
					   p=0
							}
	        }
		println(c)
	}
}

fun main() {
    readLine()?.toInt()?.let {
        repeat(it) {
            readLine()?.toInt()?.let {
                println(1 + it / 7)
            }
        }
    }
}

fun main() {
    var t = readLine()!!.toInt();
    while(t>0) {
            var x=readLine()!!.toInt();
            var ans=(x/7);
            var ans2=(x%7);
            if(ans2==0)
                println(ans);
            else
                println(ans+1);
                t--;
    }
}

fun main(args : Array<String>) {
    val numberOfQueries = readLine()!!.toInt()

    for (i in 1..numberOfQueries) {
        println(readLine()!!.toInt() / 2)
    }
}

fun main(args: Array<String>) {
    val count = readLine()!!.toInt()
    for (i in 0 until count) {
        val target = readLine()!!.toInt()
        val roll = Math.ceil(target / 7.0).toInt()
        println(roll)
    }
}

fun readInt(): Int {
    return readLine()!!.toInt()
}

fun main() {
    val T = readInt()
    for(i in 1..T) {
        var result = 0
        var n = readInt()
        while(n > 0) {
            if(n % 7 == 1)
                n -= 4
            else if(n >= 7)
                n -= 7
            else
                n -= n % 7
            result++
        }
        println(result)
    }
}

fun main(args: Array<String>) {
    val t = readLine()!!.toInt()
    repeat(t) {
        val x = readLine()!!.toInt()
        if (x % 2 == 0){
            println(x / 2)
        }else{
            var a = x - 3
            println(a / 2 + 1)
        }
    }
}

import java.io.*
import java.util.*
import java.lang.Math.*

var stok = StringTokenizer("")
var br = BufferedReader(InputStreamReader(System.`in`))

fun nextToken(): String? {
    while (!stok.hasMoreTokens()) {
        val s = br.readLine() ?: return null
        stok = StringTokenizer(s)
    }
    return stok.nextToken()
}

fun nextInt() = nextToken()!!.toInt()
fun nextDouble() = nextToken()!!.toDouble()
fun nextLong() = nextToken()!!.toLong()

fun main(args: Array<String>) {
    if (args.isNotEmpty()) br = BufferedReader(FileReader("input.txt"))
    PrintWriter(System.out, false).use { it.solve() }
}

fun PrintWriter.solve() {
    val t = nextInt()
    for (it in 0 until t) {
        val x = nextInt()
        if (x <= 7) {
            println(1)
        } else if (x % 2 == 0) {
            println(x / 2)
        } else {
            println(1 + (x - 3) / 2)
        }
    }
}

fun main() {
    val t = readLine()!!.toInt()
    for (x in 0 until t) {
        val n=readLine()!!.toInt()
        println(n/2)
    }
}

fun main(){
    var t = readLine()!!.toInt()
    val answers = mutableListOf<String>()
    while (t-- > 0){
        val x = readLine()!!.toInt()
        answers.add((x/2).toString())
    }

    println(answers.joinToString("\n"))
}

fun main() {
    val tests = readLine()!!.toInt();
    repeat(tests) {
        val points = readLine()!!.toInt()
        print((points / 7) + 1)
    }
}

import java.util.*

fun main(){
    val scanner = Scanner(System.`in`)
    var queries = scanner.nextInt()
    var queryList = arrayListOf<Int>()

    if(queries<=100) {
        while (queries > 0) {
            val contest = scanner.nextInt()
            if(contest in 2..100)
            {queryList.add(contest)}
            queries--
        }
    }
    for(elem in queryList){
        rollDice(elem)
    }
}

val diceEyes = listOf(2,3,4,5,6,7)

val evenEyes = listOf(2,4,6)

fun rollDice(number: Int): List<Int>{
    val rolls = mutableListOf<Int>()
    var sum = 0
    var i = 0
    if(number % 2 == 0){
        i = evenEyes.size-1
    }else{
        i = diceEyes.size-1
    }
    while(sum != number && i >= 0){
        var tempSum = sum
        if(number % 2 == 0){
            tempSum+=evenEyes[i]
        }else{
            tempSum += diceEyes[i]
        }

        if(tempSum <= number){
            sum = tempSum
            rolls.add(diceEyes[i])
        }else{
            i--
        }
    }
    println("${rolls.size}")
    return rolls
}

import kotlin.random.Random

fun main(args: Array<String>) {
   args.slice(1 until args.size).forEach{
       var number = it.toInt()
       var counter = 0
       while( number > 7 ){
           number -= Random.nextInt(2, 7)
           counter++
       }
       println(counter)
   }
}

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main() {
    val T = readInt()
    for (t in 0..T-1) {
        val n = readInt()
        println((n + 1) / 2)
    }
}

fun main() {
    var t = Integer.parseInt(readLine())

    while(t > 0) {
        var res = solve(Integer.parseInt(readLine()))
        println(res)
        t--
    }

}

fun solve(n:Int):Int {
    var res = 0
    var m = n
    for(i in 7 downTo 2) {
        res += m/i
        m %= i
    }
    return res
}

fun main(){
    val roundCount = readLine()!!
    val length = roundCount.length
    if (length == 1){
        if (roundCount.toInt() == 2 || roundCount.toInt() == 3)
            println("1")
        else
            println("2")

        return
    }
    println(roundCount.substring(0, roundCount.length-1).toInt() * 2)

}

fun main() {
    val parsed: List<Int> = Parser().parse()
    val solver = Solver()
    val res = parsed.map { x -> solver.solve(x) }
    res.forEach{x-> println(x)}
}

class Solver {
    private val faces : List<Int> = listOf(2,3,4,5,6,7)

    fun solve(target : Int) : Int {
        var idx: Int = faces.size - 1
        var rollCount = 1
        var currentTarget: Int = target
        for (i: Int in 0..idx) {
            val currentFace: Int = faces[idx]
            if (currentTarget < currentFace) {
                continue
            }
            currentTarget -= currentFace
            rollCount++
        }
        return rollCount
    }
}

class Parser {
    private fun lineSequence(limit: Int = Int.MAX_VALUE) = generateSequence { readLine() }.constrainOnce().take(limit)
    private fun readln() = readLine()!!
    private fun readlnInt() = readln().toInt()

    fun parse(): List<Int> {
        val queryNumber: Int = readlnInt()
        return lineSequence(queryNumber).map { x -> x.toInt() }.toList()
    }
}

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main() {
    var T = readInt()
    while(T>0) {
        var x = readInt()
        println("%d".format(x/2+x%2))
        T--
    }

}

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = readLine()!!.toInt()
    for(x in 0..n-1){
    	val tmp = readLine()!!.toInt()
    	if(tmp <= 6) println("1")
    	else{
    		println(tmp/6+tmp%6)
    	}
    }

}

import java.util.*

fun main() {
    val sc = Scanner(System.`in`)
    val t = sc.nextInt()
    repeat(t) {
        val x = sc.nextInt()
        println((x-1)/2+1)
    }//
}

fun main(args: Array<String>) = args.forEach { println(it) }

fun calculate(target: Int): Int {
    var nums = listOf(7, 6, 5, 4, 3, 2)
    var currentTarget = target
    var throws = 0
    while (nums.isNotEmpty()) {
        while (currentTarget >= nums.first()) {
            currentTarget -= nums.first()
            throws++
        }
        nums = nums.drop(1)
    }
    return throws
}

fun main(args: Array<String>) {
    repeat(readLine()!!.toInt()) {
        println(calculate(readLine()!!.toInt()))
    }
}

import java.util.*

fun main(){
    val scanner = Scanner(System.`in`)
    var queries = scanner.nextInt()
    if(queries<=100) {
        while (queries > 0) {
            val contest = scanner.nextInt()
            if(contest in 2..100)
            {rollDice(contest)}
            queries--
        }
    }
}

val diceEyes = listOf(2,3,4,5,6,7)

fun rollDice(number: Int): List<Int>{
    val rolls = mutableListOf<Int>()
    var sum = 0
    var i = diceEyes.size-1
    while(sum != number && i >= 0){
        var tempSum = sum
        tempSum += diceEyes[i]
        if(tempSum <= number){
            sum = tempSum
            rolls.add(diceEyes[i])
        }else{
            i--
        }
    }
    println("${rolls.size}")
    return rolls
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    for (i in 0 until n) {
        val x = readLine()!!.toInt()
        val t = x / 2
        if (t*2 == x) {
            println(t)
        } else {
            println(t+1)
        }
    }
}

import java.util.*

fun main(){
    val scanner = Scanner(System.`in`)
    var queries = scanner.nextInt()
    while (queries >0){
        rollDice(scanner.nextInt())
        queries--
    }
}

val diceEyes = listOf(2,3,4,5,6,7)

fun rollDice(number: Int): List<Int>{
    val rolls = mutableListOf<Int>()
    var sum = 0
    var i = diceEyes.size-1
    while(sum != number && i >= 0){
        var tempSum = sum
        tempSum += diceEyes[i]
        if(tempSum <= number){
            sum = tempSum
            rolls.add(diceEyes[i])
        }else{
            i--
        }
    }
    println("${rolls.size}")
    return rolls
}

fun main() {
    val n = readLine()!!.toInt()
    repeat (n) {
        readLine()!!.toInt()
        println(n)
    }
}

fun main()
{
    val t = readLine()!!.toInt()
    for (i in 1 .. t)
    {
        println(treatTestCase())
    }
}

fun treatTestCase(): String
{
    val x = readLine()!!.toInt()

    // if even, return divided by 2
    // else if its 3 return 1
    // else remove three then return divided by 2 + 1

    return when
    {
        x % 2 == 0 ->
        {
            println("Roll 2 ${x / 2} times")
            (x / 2).toString()
        }
        x == 3     ->
        {
            println("Roll 3 once")
            (1).toString()
        }
        else       ->
        {
            println("Roll 3 once and 2 ${(x - 3) / 2} times")
            ((x - 3) / 2 + 1).toString()
        }
    }
}

import java.io.BufferedReader
import java.io.InputStreamReader

fun main() {
    BufferedReader(InputStreamReader(System.`in`)).lineSequence().drop(1).map {
        it.toInt() / 2
    }.joinToString {
        it.toString()
    }.let(::println)
}

import java.util.*

fun main(args: Array<String>) = with(Scanner(System.`in`)) {
    val t = nextInt()
    val x = nextInt()
    println(x)
}

fun main(args: Array<String>) {
    val numOfLines = readLine()!!.toInt()

    (0 until numOfLines)
        .map { readLine()!!.toInt() }
        .forEach {query ->
            val answer = query % 7 + 1
            println(answer)
        }

}

fun main(args : Array<String>){
    if (args.isNotEmpty()) {
        for (i in 1..args[0].toInt()) {
            println(args[i].toInt() / 7)
        }
    }
}

fun main()
{
    var n = readLine()!!.toInt()

    for (i in 1..n)
    {
        var x = readLine()!!.toInt()

        var j = 0

        while (x >= 6)
        {
            j++
            x -= 6
        }

    }
}

fun main() {
    var t = Integer.parseInt(readLine())

    while(t > 0) {
        var res = solve(Integer.parseInt(readLine()))
        println(res)
        t--
    }

}

fun solve(n:Int):Int {
    var res = 0
    var m = n
    for(i in 7 downTo 2) {
        res += m/i
        m %= i
    }
    return res
}

fun main() {

    val queries = readLine()!!.toInt()

    for (i in 0 until queries) {
        val points = readLine()!!.toInt()

        val maxRolls = Math.ceil(points / 2.0)

        println(maxRolls.toInt())
    }

}

val sides = arrayOf(2, 3, 4, 5, 6, 7)
val output = mutableListOf<Int>()

fun main() {

    val requestCounts = readInt()
    for (i in 0 until requestCounts) {
        val number: Int  = readInt()
        calculateAttemptCounts(number)
    }

    for (out in output) {
        println(out)
    }
}

fun readInt(): Int {
    return readLine()!!.toInt()
}

fun calculateAttemptCounts(number: Int) {
    var tempNumber = number
    var attemptCounts = 0
    for (side in sides.reversedArray()) {
        val tempCount: Int = tempNumber / side

        if (tempCount == 0) continue

        attemptCounts += tempCount

        if (tempNumber % side == 0) {
            output.add(attemptCounts)
            break
        }

        tempNumber %= side
    }
}

fun main() {
    val MIN_VAL = 2
    val MAX_VAL = 7
    val N = readLine()!!.toInt()
    val scores: MutableList<Int> = ArrayList()
    for (i in 0 until N) {
        scores.add(readLine()!!.toInt())
    }
    val answer: MutableList<Int> = ArrayList()

    scores.forEach {
        var currentScore = MAX_VAL
        var currentAmountScore = it
        var amountSteps = 0

        while (currentAmountScore >= 0 && currentScore >= MIN_VAL) {
            while (currentScore <= currentAmountScore) {
                currentAmountScore -= currentScore
                amountSteps++
            }
            currentScore--
        }
        answer.add(amountSteps)
    }
    answer.forEach(::println)
}

fun getInputs(): List<Int> {
    val count = readLine()!!
    return List(count.toInt()) { readLine()!!.toInt() }
}

fun calculate(target: Int): Int {
    var nums = listOf(7, 6, 5, 4, 3, 2)
    var currentTarget = target
    var throws = 0
    while (nums.isNotEmpty()) {
        while (currentTarget >= nums.first()) {
            currentTarget -= nums.first()
            throws++
        }
        nums = nums.drop(1)
    }
    return throws
}

fun main(args: Array<String>) {
    val queries = getInputs()
    queries.forEach { println(calculate(it)) }
}

import java.util.Scanner
fun main(args:Array<String>) {
    val read = Scanner(System.`in`)
       val n:Int = read.nextInt()
       val ans = n/2 + n%2
      println("$ans")

}

fun main() {
    val solver = Solver()
    val res = solver.solve(100)
    println(res)
}

class Solver {
    private val faces : List<Int> = listOf(2,3,4,5,6,7)

    fun solve(target : Int) : Int {
        var idx: Int = faces.size - 1
        var rollCount = 1
        var currentTarget: Int = target
        for (i: Int in 0..idx) {
            val currentFace: Int = faces[idx]
            if (currentTarget < currentFace) {
                continue
            }
            currentTarget -= currentFace
            rollCount++
        }
        return rollCount
    }
}

class Parser {
    private fun lineSequence(limit: Int = Int.MAX_VALUE) = generateSequence { readLine() }.constrainOnce().take(limit)
    private fun readln() = readLine()!!
    private fun readlnInt() = readln().toInt()

    fun parse(): List<Int> {
        val queryNumber: Int = readlnInt()
        return lineSequence(queryNumber).map { x -> x.toInt() }.toList()
    }
}

fun main(args: Array<String>) {
    val countLine = readLine()
    println(countLine)
}

fun main(){
    val points = readLine()!!.toInt()
    print((points/7)+1)
}

fun main(){
    val roundCount = readLine()?.toIntOrNull()
    roundCount?.let {count->
        val arrayOfPoints = Array(3){
            readLine()?.toIntOrNull()
        }
        arrayOfPoints.forEach {
            it?.let {
                println(it/2)
            }
        }
    }
}

import java.util.*

fun main(){
    val scanner = Scanner(System.`in`)
    var queries = scanner.nextInt()
    if(queries<=100) {
        while (queries > 0) {
            rollDice(scanner.nextInt())
            queries--
        }
    }
}

val diceEyes = listOf(2,3,4,5,6,7)

fun rollDice(number: Int): List<Int>{
    val rolls = mutableListOf<Int>()
    var sum = 0
    var i = diceEyes.size-1
    while(sum != number && i >= 0){
        var tempSum = sum
        tempSum += diceEyes[i]
        if(tempSum <= number){
            sum = tempSum
            rolls.add(diceEyes[i])
        }else{
            i--
        }
    }
    println("${rolls.size}")
    return rolls
}

import java.util.Scanner
object programkt {
  @JvmStatic fun main(args:Array<String>) {
    val sc = Scanner(System.`in`)
    val tc = sc.nextInt()
    for (i in 1..tc)
    {
      val n = sc.nextInt()
      println(n)
    }
  }
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    for (i in 1..n) {
        val x = readLine()!!.toInt()
        when {
            x < 8 -> print(1)
            x % 2 == 0 -> print(x / 2)
            else -> print((x - 3) / 2 + 1)
        }
    }
}

fun main(args: Array<String>) {
   args.slice(1 until args.size).forEach{
       var number = it.toInt()
       var counter = 0
       while( number > 0 ){
           number -= 7
           counter++
       }
       println(counter)
   }
}

import com.sun.org.apache.xpath.internal.operations.Bool

fun main(args: Array<String>) {
    val scanner = java.util.Scanner(System.`in`)
    var inputCount = scanner.nextLine()
    val count = inputCount.toInt()
    var inputList = ArrayList<Int>(count)

    val minBoneValue = 2
    val maxBoneValue = 7
    val minValue = 1

    for (x in minValue..count) {
        var value = scanner.nextLine()
        inputList.add(value.toInt())
    }

    for (x in inputList) {
        if(x >= minBoneValue && x <= maxBoneValue){
            println(minValue)
        }
        else {
            var throwsCount = (x/maxBoneValue)
            val remainder = x%maxBoneValue
            if(remainder != minValue)
                throwsCount++
            println(throwsCount)
        }
    }
}

fun main(args : Array<String>) {
    if (args.isNotEmpty()) {
        Array(args[0].toInt()) { i ->(args[i+1].toInt()/7)+1 }.forEach(::println)
    }
}

val scan = java.util.Scanner(System.`in`)
fun main(args: Array<String>) {
    var t = scan.nextInt()
    repeat(t) {
        var n = scan.nextInt()
        var f = IntArray(n + 7, {0})
        f[0] = 0
        f[1] = 1
        for (i in 2..6) {
            f[i] = 1
        }
        for (i in 7..n) {
            f[i] = Math.min(Math.min(Math.min(f[i - 2], f[i - 3]), Math.min(f[i - 4], f[i - 5])), f[i - 6]) + 1
        }
        print(f[n])
    }
}

fun main() {
    println(numRolls(2))
    println(numRolls(13))
    println(numRolls(37))
    println(numRolls(100))
}

private fun numRolls(points: Int): Int {
    var numRolls = 0
    var remainingPoints = points
    for (i in 2..7) {
        var rolls = remainingPoints / i
        while (rolls > 0) {
            numRolls += rolls
            remainingPoints %= i
            rolls = remainingPoints / i
        }
    }
    return numRolls
}

fun main(args : Array<String>){
    if (args.isNotEmpty()) {
        for (i in 1..args[0].toInt()) {
            println(args[i].toInt() / 7)
        }
    }
}

fun main() {
          val t = readInt()
    for (i in 1..t) {
        val summ = readLine()!!.toInt()
        recCal(summ)
    }
  }

fun recCal(value: Int): Int {
    return when {
        value in 2..7 ->  1
        value == 8 ->  2
        else -> 1 + recCal(value - 7)

    }
}
fun check(value: Int, m: Int) = (value / m) * m + (value % m)
fun readInt() = readLine()!!.toInt()

fun main() {
    val tests = readLine()!!.toInt();
    repeat(tests) {
        val points = readLine()!!.toInt()
        print((points / 7) + 1)
    }
}

val sides = arrayOf(2, 3, 4, 5, 6, 7)
val output = mutableListOf<Int>()

fun main() {

    val requestCounts = readInt()
    for (i in 0 until requestCounts) {
        val number: Int  = readInt()
        calculateAttemptCounts(number)
    }

    output.forEachIndexed { index, i ->
        if (index == output.lastIndex) print(i)
        else println(i)
    }
}

fun readInt(): Int {
    return readLine()!!.toInt()
}

fun calculateAttemptCounts(number: Int) {
    var tempNumber = number
    var attemptCounts = 0
    for (side in sides.reversedArray()) {
        val tempCount: Int = tempNumber / side

        if (tempCount == 0) continue

        attemptCounts += tempCount

        if (tempNumber % side == 0) {
            output.add(attemptCounts)
            break
        }

        tempNumber %= side
    }
}

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main() {
    var T = readInt()
    while(T>0) {
        var x = readInt()
        println("%d".format(x))
        T--
    }

}

import java.util.Scanner
fun main(args:Array<String>) {
    val read = Scanner(System.`in`)
       val t:Int = read.nextInt()
       for (i in 1..t)
    {
        val n:Int = read.nextInt()
          val ans = n/2 + n%2
          println("$ans")
    }

}

import java.util.*

fun main() {
    val reader = Scanner(System.`in`)
    val queries = reader.nextInt()
    println(queries)
    val output = IntArray(queries)
    for (i in 0 until queries) {
        val point = reader.nextInt()
        output[i] = getCount(point)
    }
    output.forEach {
        println(it)
    }
}

fun getCount(point: Int): Int {
    return if (point in 2..7) {
        1
    } else {
        val rem = point % 7
        if (rem == 0) {
            point / 7
        } else {
            (point / 7) + 1
        }
    }
}

fun main(){
    val roundCount = readLine()?.toIntOrNull()
    roundCount?.let {count->
        val arrayOfPoints = Array(3){
            readLine()?.toIntOrNull()
        }
        arrayOfPoints.forEach {
            it?.let {
                println(it/2)
            }
        }
    }
}

fun main(args : Array<String>){
    if (args.isNotEmpty()) {
        Array(args[0].toInt()) { i ->(args[i+1].toInt()/7)+1 }.forEach(::print)
    }
}

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = readLine()!!.toInt()
    for(x in 0..n-1){
    	val tmp = readLine()!!.toInt()
    	println(tmp)
    }

}

fun main() {
    val n = readLine()!!.toInt()
    repeat (n) {
        readLine()!!.toInt()
        println(n)
    }
}

fun main(){
    val points = readLine()!!.toInt()
    println((points/7)+1)
}

import java.io.*
import java.math.*
import java.text.*
import java.util.*
import java.util.regex.*

fun main(args: Array<String>) {
    val scan = Scanner(System.`in`)
    val t = scan.nextInt()
    for (i in 1..t) {
        val num = scan.nextInt()
        if( num%2==0)
        print("1\n")
        else
        print("2\n")
    }
}

fun main() {
    readLine()?.toInt()?.let { numCases ->
        for (case in 0 until numCases) {
            readLine()?.toInt()?.let { println(numRolls(it)) }
        }
    }
}

private fun numRolls(points: Int): Int {
    var numRolls = 0
    var remainingPoints = points
    for (i in 7 downTo 2) {
        var rolls = remainingPoints / i
        while (rolls > 0) {
            numRolls += rolls
            remainingPoints %= i
            rolls = remainingPoints / i
        }
    }
    return numRolls
}

fun main()
{
    val t = readLine()!!.toInt()
    for (i in 1 .. t)
    {
        println(treatTestCase())
    }
}

fun treatTestCase(): String
{
    val x = readLine()!!.trim().toInt()

    // if even, return divided by 2
    // else if its 3 return 1
    // else remove three then return divided by 2 + 1

    return when
    {
        x % 2 == 0 ->
        {
            println("Roll 2 ${x / 2} times")
            (x / 2).toString()
        }
        x == 3     ->
        {
            println("Roll 3 once")
            (1).toString()
        }
        else       ->
        {
            println("Roll 3 once and 2 ${(x - 3) / 2} times")
            ((x - 3) / 2 + 1).toString()
        }
    }
}

private fun main() {

    val t = readInt()
    val mas = mutableListOf<Int>()
    (0 until t).forEach {
        mas += readInt()
    }

    mas.forEach { num ->
        if (num == 2) {
            println(1)

        } else if (num % 2 == 0) {
            println(num / 2)
        } else {
            println((num - 1) / 2 + 1)
        }
    }
}

////////////////////////////////////////////////// STUFF ///////////////////////////////////////////////////////////////

// input

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

// algorithms

// binomial coefficients C^n_k

private fun cN2(n: Int): Int {
    if (n <= 1)
        throw IllegalArgumentException("n must be positive integer >= 2")

    return n * (n - 1) / 2
}

fun main(args: Array<String>) {
    args.forEach{
        println(it)
    }
}

fun main() {
    var t = Integer.parseInt(readLine())

    while(t > 0) {
        var res = solve(Integer.parseInt(readLine()))
        println(res)
        t--
    }

}

fun solve(n:Int):Int {
    var res = 0
    var m = n
    for(i in 7 downTo 2) {
        res += m/i
        m %= i
    }
    return res
}

fun main() {
    val t = readLine()!!.toInt()
    for (i in 1..t) {
        val x = readLine()!!.toInt()
        println (x / 2 + x % 2)
    }
}

fun main(args: Array<String>) {
   args.slice(1 until args.size).forEach{
       var number = it.toInt()
       var counter = 0
       while( number > 0 ){
           number -= 7
           counter++
       }
       println(counter)
   }
}

fun main()
{
    var n = readLine()!!.toInt()

    for (i in 1..n)
    {
        var x = readLine()!!.toInt()

        var j = 0

        while (x >= 6)
        {
            j++
            x -= 6
        }

        println(j)

    }
}

fun main()
{
    val n = readLine()!!.toInt() / 2
    println(n)
}

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    for (i in 0 until sc.nextInt()) {
        val n = sc.nextInt()
        val q = n / 2
        val p = n % 2
        println(q - p)
    }
}

fun main(args: Array<String>) {

    val diceNumbers = 7 downTo 2
    val rounds = readLine()!!.toInt()

    val queriedNumbers = (1..rounds).asSequence()
            .map { readLine() }
            .filterNotNull()
            .map { it.toInt() }
            .toList()

    for (queriedNumber in queriedNumbers)
    {
        var rolls = 0
        var remaining = queriedNumber

        for (diceNumber in diceNumbers)
        {
            val rollsWithCurrentNumber = remaining / diceNumber

            rolls += rollsWithCurrentNumber
            remaining -= rollsWithCurrentNumber * diceNumber

            if (remaining == 0)
            {
                break
            }
        }

        println(rolls)
    }
}

class DiceRolling {
    fun all(points: List<Int>): List<Int> {
        val results = mutableListOf<Int>()
        points.forEach { results.add(one(it)) }
        return results
    }

    // 2, 3, 4, 5, 6, 7
    fun one(point: Int): Int {
        return if (point <= 7) 1
        else {
            1 + one(point - 6)
        }
    }
}

fun main(args: Array<String>) {
    val points = args.drop(1).map { Integer.parseInt(it) }
    println(DiceRolling().all(points))
}

fun main() {
    val t = readLine()!!.toInt()
    for (i in 1..t) {
        val x = readLine()!!.toInt()
        println (x / 2 - x % 2)
    }
}

fun main(args: Array<String>) {
    val scanner = java.util.Scanner(System.`in`)
    var inputCount = scanner.nextLine()
    val count = inputCount.toInt()
    var inputList = ArrayList<Int>(count)

    val minBoneValue = 2
    val maxBoneValue = 7
    val minValue = 1

    for (x in minValue..count) {
        var value = scanner.nextLine()
        inputList.add(value.toInt())
    }

    for (x in inputList) {
        if(x >= minBoneValue && x <= maxBoneValue){
            println(minValue)
        }
        else {
            var throwsCount = (x/maxBoneValue)
            val remainder = x%maxBoneValue
            if(remainder > minValue)
                throwsCount++
            println(throwsCount)
        }
    }
}

fun main()
{
    val t = readLine()!!.toInt()
    for (i in 1 .. t)
    {
        println(treatTestCase())
    }
}

fun treatTestCase(): String
{
    var x = readLine()!!.toInt()

    var c = 7
    var count = 0

    while (x > 0 && c > 1)
    {
        if (x >= c)
        {
            val remainder = x % c
            count += (x - remainder) / c
            x = remainder
        }

        c--
    }

    return count.toString()
}

import java.util.*
import kotlin.collections.ArrayList
fun main() {
    val read=Scanner(System.`in`);
    var test=read.nextInt();
    while((test--)>0){
        var x=read.nextInt();
        println(x);
        var cnt=0;

        for (i in 7 downTo 2){

            if(x==0)break;
            cnt+=x/i;
            x %= i;
        }
        println(cnt);
    }
}

import java.util.*

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readLong() = readLn().toLong()
// etc for other types you'd use in your solutions
fun main(args: Array<String>){
    val t = readInt()
    for(i in 1..t){
        var x = readInt()
        var total: Int=0
        for(j in 7 downTo 2){
            total += x/j
            x = x%j
        }
        println("$total")
    }
}

import java.util.*

fun main(args: Array<String>) = with(Scanner(System.`in`)){

    val dice = arrayOf(7,6,5,4,3,2)

    val t = nextInt()
    val points = IntArray(t)
    for (count in 0 until t)
        points[count] = nextInt()

    for(point in points){
        var rolls = 0
        var tempPoint = point
        for(num in dice)
            if(num <= tempPoint)
            {
                rolls += (tempPoint/num)
                tempPoint %= num
            }
        println(rolls)
    }
}

fun main(args: Array<String>) {
    val countLine = readLine()
    println(countLine)
}

import java.io.*
import java.math.*
import java.text.*
import java.util.*
import java.util.regex.*

fun main(args: Array<String>) {
    val scan = Scanner(System.`in`)
    val t = scan.nextInt()
    for (i in 1..t) {
        val num = scan.nextInt()
        if( num%2==0)
        print("1\n")
        else
        print("2\n")
    }
}

fun readInts(separator: Char = ' ') = readLine()!!.split(separator).map(String::toInt)
fun main() {
    val A = readInts()
    for(i in 1..A.size-1){
        val x = A[i]/2
        println("$x")
    }
}

fun main() {
    var t = Integer.parseInt(readLine())

    while(t > 0) {
        var res = solve(Integer.parseInt(readLine()))
        println(res)
        t--
    }

}

fun solve(n:Int):Int {
    var res = 0
    var m = n
    for(i in 7 downTo 2) {
        res += m/i
        m %= i
    }
    return res
}

import kotlin.random.Random

fun main(args: Array<String>) {
   args.slice(1 until args.size).forEach{
       var number = it.toInt()
       var counter = 0
       while( number > 7 ){
           number -= Random.nextInt(2, 7)
           counter++
       }
       println(counter)
   }
}

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = readLine()!!.toInt()
    for(x in 0..n-1){
    	val tmp = readLine()!!.toInt()
    	if(tmp <= 6) println("1")
    	else{
    		println(tmp/6+tmp%6)
    	}
    }

}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    for (i in 0 until n) {
        val x = readLine()!!.toInt()
        val t = x / 2
        if (t*2 == x) {
            println(t)
        } else {
            println(t+1)
        }
    }
}


Sereja showed an interesting game to his friends. The game goes like that. Initially, there is a table with an empty cup and n water mugs on it. Then all players take turns to move. During a move, a player takes a non-empty mug of water and pours all water from it into the cup. If the cup overfills, then we assume that this player lost.As soon as Sereja's friends heard of the game, they wanted to play it. Sereja, on the other hand, wanted to find out whether his friends can play the game in such a way that there are no losers. You are given the volumes of all mugs and the cup. Also, you know that Sereja has (n - 1) friends. Determine if Sereja's friends can play the game so that nobody loses.

The first line contains integers n and s (2 ≤ n ≤ 100; 1 ≤ s ≤ 1000) — the number of mugs and the volume of the cup. The next line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 10). Number ai means the volume of the i-th mug.

In a single line, print "YES" (without the quotes) if his friends can play in the described manner, and "NO" (without the quotes) otherwise.

import java.util.*

fun main(args: Array<String>) = with(Scanner(System.`in`), {
    var (n, s) = readLine()!!.split(" ").map { it.toInt() }
    var mx = 0
    var sum = 0
    for (i in 1..n) {
        sum += nextInt().apply { mx = Math.max(mx, this) }
    }
    if (sum - mx <= s) print("YES") else print("NO")
})

fun main() {
    fun readInts() = readLine()!!.split(" ").map(String::toInt)

    val (_, s) = readInts()
    val a = readInts()
    print(if (a.sum() - a.max()!! <= s) "YES" else "NO")
}

import java.util.*

fun min(a:Double,b:Double) = if (a<b) a else b
fun max(a:Double,b:Double) = if (a>b) a else b
fun min(a:Int,b:Int) = if (a<b) a else b
fun max(a:Int,b:Int) = if (a>b) a else b
fun printD(d: Double) { print(d) }
fun printI(d:Int) { print(d) }
fun printS(d: String) { print(d) }
fun printL(d: Long) { print(d) }
fun readLn() = readLine()!!
fun readInt() = readLn().toInt()
fun readInts()  = readLn().split(" ").map{it.toInt()}
fun readLong() = readLn().toLong()
class pair (var first:Int, var second:Int)

fun solve() {
   val cin = Scanner(System.`in`)

   /*
   map[q] <=> map.getOrDefault(q,0)
   Сортировка вектора пар - k=v.sortedWith(compareBy({it.first},{it.second}));
   print("${k[i].second}"); - вывод аргумента пары
   var m=ArrayList<int> (); <=> vector
   getline(cin,a) <=> readLine()!!.last()

  readInt() - одно число
  readInts() - несколько чисел

   */

    /* --------- */

 var (a,b)=readInts();
 var q=readInts();
 var sum=0;
 var max1=0;
 for (i in q) {
 max1=max(max1,i); sum+=i; }
 if (b>=sum-max1) print("YES"); else print("NO");
   /* --------- */

}

    fun main() {
    val cin = Scanner(System.`in`)

    var T=1;
    //T=readLine()!!.toInt();

    for (i55555 in 1..T) solve()
}