#include<bits/stdc++.h>
using namespace std;

int main() {
  int n, x;
  cin >> n >> x;

  vector<long long> a(n+1);
  a.at(0) = 0;
  int t;
  for(int i = 0; i < n; ++i){cin >> t; a.at(i+1) = a.at(i) + t;}

  long long ans = 1ll << 62;
  long long tans = 0;
  long long b;
  long long coef;
  for(int k = 1; k <= n; ++k) {
    tans = 0;
    b = 1ll*(n+k)*x;
    for(int i = 0; i < (n+(k-1))/k; ++i){
      coef = i?2*i+3:5;
      tans += coef * (a.at(n - i * k) - a.at(max(n - (i + 1) * k, 0)));
    }
    ans = min(ans, tans+b);
  }