/*
JAVA program for RACING
Summary: Find the maximum revenue, m, and outputs floor(m / 5)
*/

import java.util.*;

class RESORT {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int numCases = sc.nextInt();
        assert numCases > 0;
        while (numCases-- > 0) {
            RESORTs.solve(sc);
        }
        assert sc.nextInt() == 0;
    }
}

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

    static void solve(Scanner sc) {
        int t = sc.nextInt();

        assert t > 0 && t <= 1000;

        int m = -1000000;
        for (int i = 0; i < t; i++) {
            int v = sc.nextInt();
            assert v > 0 && v <= 10000;
            m = Math.max(m, v);
        }

        System.out.println(m/5);
    }
}
