Little Vasya went to the supermarket to get some groceries. He walked about the supermarket for a long time and got a basket full of products. Now he needs to choose the cashier to pay for the products.

There are *n* cashiers at the exit from the supermarket. At the moment the queue for the *i*-th cashier already has *k*<sub class="lower-index">*i*</sub> people. The *j*-th person standing in the queue to the *i*-th cashier has *m*<sub class="lower-index">*i*, *j*</sub> items in the basket. Vasya knows that:
 -  the cashier needs 5 seconds to scan one item; -  after the cashier scans each item of some customer, he needs 15 seconds to take the customer's money and give him the change. 
Of course, Vasya wants to select a queue so that he can leave the supermarket as soon as possible. Help him write a program that displays the minimum number of seconds after which Vasya can get to one of the cashiers.
The first line contains integer *n* (1 ≤ *n* ≤ 100) — the number of cashes in the shop. The second line contains *n* space-separated integers: *k*<sub class="lower-index">1</sub>, *k*<sub class="lower-index">2</sub>, ..., *k*<sub class="lower-index">*n*</sub> (1 ≤ *k*<sub class="lower-index">*i*</sub> ≤ 100), where *k*<sub class="lower-index">*i*</sub> is the number of people in the queue to the *i*-th cashier.

The *i*-th of the next *n* lines contains *k*<sub class="lower-index">*i*</sub> space-separated integers: *m*<sub class="lower-index">*i*, 1</sub>, *m*<sub class="lower-index">*i*, 2</sub>, ..., *m*<sub class="lower-index">*i*, *k*<sub class="lower-index">*i*</sub></sub> (1 ≤ *m*<sub class="lower-index">*i*, *j*</sub> ≤ 100) — the number of products the *j*-th person in the queue for the *i*-th cash has.
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int n;
    std::cin >> n;
    int ans = 750000;
    std::vector<int> k(n);
    for (int i = 0; i < n; i++) {
        std::cin >> k[i];
    }
    for (int i = 0; i < n; i++) {
        std::vector<int> m(k[i]); 
        for (int j = 0; j < k[i]; j++) {
            std::cin >> m[j]; 
        }
        int sum_m = std::accumulate(m.begin(), m.end(), 0);
        ans = std::min(ans, sum_m * 5 + k[i] * 15);
    }
    std::cout << ans << std::endl;
    return 0;
}
