/**
* code generated by JHelper
* More info: https://g...content-available-to-author-only...b.com/AlexeyDmitriev/JHelper
* @author gainullin.ildar
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <list>
#include <time.h>
#include <math.h>
#include <random>
#include <deque>
#include <queue>
#include <cassert>
using namespace std;
typedef long long ll;
const int N = 1e5 + 7;
int n, S;
int a[N];
ll b[N];
ll res(int k)
{
for (int i = 0; i < n; i++)
{
b[i] = a[i] + (i + 1) * (ll) k;
}
sort(b, b + n);
ll ans = 0;
for (int i = 0; i < k; i++)
{
ans += b[i];
}
return ans;
}
class Main
{
public:
void solve(std::istream &in, std::ostream &out)
{
in >> n >> S;
for (int i = 0; i < n; i++)
{
in >> a[i];
}
int l = 0, r = n + 1;
while (l < r - 1)
{
int m = (l + r) / 2;
if (res(m) <= S)
{
l = m;
}
else
{
r = m;
}
}
out << l << ' ' << res(l) << '\n';
}
};
int main()
{
ios::sync_with_stdio(0);
Main solver;
std::istream &in(std::cin);
std::ostream &out(std::cout);
solver.solve(in, out);
return 0;
}
LyoqCiAqIGNvZGUgZ2VuZXJhdGVkIGJ5IEpIZWxwZXIKICogTW9yZSBpbmZvOiBodHRwczovL2cuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLmIuY29tL0FsZXhleURtaXRyaWV2L0pIZWxwZXIKICogQGF1dGhvciBnYWludWxsaW4uaWxkYXIKICovCgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDxzZXQ+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDxsaXN0PgojaW5jbHVkZSA8dGltZS5oPgojaW5jbHVkZSA8bWF0aC5oPgojaW5jbHVkZSA8cmFuZG9tPgojaW5jbHVkZSA8ZGVxdWU+CiNpbmNsdWRlIDxxdWV1ZT4KI2luY2x1ZGUgPGNhc3NlcnQ+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdHlwZWRlZiBsb25nIGxvbmcgbGw7Cgpjb25zdCBpbnQgTiA9IDFlNSArIDc7CgppbnQgbiwgUzsKaW50IGFbTl07CmxsIGJbTl07CgpsbCByZXMoaW50IGspCnsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQogICAgewogICAgICAgIGJbaV0gPSBhW2ldICsgKGkgKyAxKSAqIChsbCkgazsKICAgIH0KICAgIHNvcnQoYiwgYiArIG4pOwogICAgbGwgYW5zID0gMDsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgazsgaSsrKQogICAgewogICAgICAgIGFucyArPSBiW2ldOwogICAgfQogICAgcmV0dXJuIGFuczsKfQoKY2xhc3MgTWFpbgp7CnB1YmxpYzoKICAgIHZvaWQgc29sdmUoc3RkOjppc3RyZWFtICZpbiwgc3RkOjpvc3RyZWFtICZvdXQpCiAgICB7CiAgICAgICAgaW4gPj4gbiA+PiBTOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgaW4gPj4gYVtpXTsKICAgICAgICB9CiAgICAgICAgaW50IGwgPSAwLCByID0gbiArIDE7CiAgICAgICAgd2hpbGUgKGwgPCByIC0gMSkKICAgICAgICB7CiAgICAgICAgICAgIGludCBtID0gKGwgKyByKSAvIDI7CiAgICAgICAgICAgIGlmIChyZXMobSkgPD0gUykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgbCA9IG07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICByID0gbTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBvdXQgPDwgbCA8PCAnICcgPDwgcmVzKGwpIDw8ICdcbic7CiAgICB9Cn07CgoKaW50IG1haW4oKQp7CiAgICBpb3M6OnN5bmNfd2l0aF9zdGRpbygwKTsKICAgIE1haW4gc29sdmVyOwogICAgc3RkOjppc3RyZWFtICZpbihzdGQ6OmNpbik7CiAgICBzdGQ6Om9zdHJlYW0gJm91dChzdGQ6OmNvdXQpOwogICAgc29sdmVyLnNvbHZlKGluLCBvdXQpOwogICAgcmV0dXJuIDA7Cn0K