import std.stdio;
import std.ascii;
import std.conv;
import std.string;
import std.algorithm;
import std.range;
import std.functional;
import std.math;
import core.bitop;
import std.numeric;

alias lread(T) = () => readln.chomp.to!T;
alias aryread(T) = () => readln.split.to!(T[]);

void main()
{
    auto nx = aryread!ulong();
    auto N = nx[0];
    auto X = nx[1];
    auto A = aryread!ulong();
    // A.writeln;

    alias e = (i, x) => ((i == 1) ? 5 : (2 * i + 1)) * x;

    ulong result = ulong.max;

    foreach (k; 1 .. N + 1)
    {
        ulong tmp = N * X + ((N + (k - 1)) / k) * X;
        foreach (i; 0 .. N)
        {
            tmp += e(i / k + 1, A[N - i - 1]);
        }
        result = result.min(tmp);
    }
    writeln(result);
}
