#include <bits/stdc++.h>
using namespace std;
long long E(long long i, long long x) {
  if (i == 1) {
    return 5 * x;
  }
  return (2 * i + 1) * x;
}
int main() {
  long long N, X;
  cin >> N >> X;
  vector<long long> x(N);
  for (long long i = 0; i < N; i++) {
    cin >> x[i];
  }
  for (long long i = 1; i < x.size(); i++) {
    x[i] += x[i - 1];
  }
  x.insert(x.begin(), 0);
  long long energy = 1e18;
  for (long long k = 1; k <= N; k++) {
    long long cost = (N + k) * X;
    for (long long i = 1; i <= N; i++) {
      if (i * k <= N) {
        cost += E(i, x[i * k] - x[(i - 1) * k]);
      } else {
        cost += E(i, x.back() - x[(i - 1) * k]);
        break;
      }
    }
    if (cost < energy) {
      energy = cost;
    }
  }
  cout << energy << endl;
}
