#include <bits/stdc++.h>   using namespace std;   int main() {     int n, i, j, sum, min = 1000000000;     cin >> n;     int k[n];     for (i = 0; i < n; i++) cin >> k[i];     for (i = 0; i < n; i++) {       sum = 0;       int m[k[i]];       for (j = 0; j < k[i]; j++) {         cin >> m[j];         sum = sum + 5 * m[j] + 15;       }       if (sum < min) min = sum;     }     cout << min;   }   