#include <bits/stdc++.h>
using namespace std;
int N, X;
int arr[300000];
long long int sum[300000];
long long int ans = 12345678987687654321LL;
long long int f(int K) {
  long long int ret = (long long int)N * X + (long long int)K * X;
  int cnt = 1;
  for (int i = N; i > 0; i -= K) {
    int e = i;
    int s = max(1, i - K + 1);
    ret += (long long int)(sum[e] - sum[s - 1]) * (cnt == 1 ? 5 : cnt * 2 + 1);
    cnt++;
  }
  return ret;
}
int main() {
  scanf("%d %d", &N, &X);
  for (int i = 1; i <= N; i++) {
    scanf("%d", arr + i);
  }
  for (int i = 1; i <= N; i++) {
    sum[i] = sum[i - 1] + arr[i];
  }
  for (int i = 1; i <= N; i++) {
    ans = min(ans, f(i));
  }
  printf("%lld\n", ans);
  return 0;
}
