#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long N, X;
  cin >> N >> X;
  unsigned long long x[N];
  for (unsigned long long i = 0; i < N; i++) {
    cin >> x[i];
  }
  unsigned long long currentAns = 0;
  unsigned long long bestAns = 0;
  for (unsigned long long i = 0; i < N; i++) {
    unsigned long long group = (unsigned long long)ceil((double)N / (i + 1));
    currentAns = (N + (i + 1)) * X;
    for (unsigned long long j = 0; j < group; j++) {
      unsigned long long sum = 0;
      for (unsigned long long k = 0; k < i + 1; k++) {
        if ((i + 1) * j + k < N) {
          sum += x[N - ((i + 1) * j + k) - 1];
        }
      }
      if (j == 0) {
        currentAns += 5 * sum;
      } else {
        currentAns += (2 * (j + 1) + 1) * sum;
      }
    }
    if (i == 0) {
      bestAns = currentAns;
    }
    if (currentAns < bestAns) {
      bestAns = currentAns;
    }
  }
  cout << bestAns << endl;
}
