#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
int64 MinSum(vector<pair<int, int>> &nums, int count) {
  auto cmp = [count](const pair<int, int> &a, const pair<int, int> &b) -> bool {
    return a.first + 1LL * a.second * count < b.first + 1LL * b.second * count;
  };
  sort(nums.begin(), nums.end(), cmp);
  int64 cost = 0;
  for (int i = 0; i < count; ++i) {
    cost += nums[i].first + 1LL * nums[i].second * count;
  }
  return cost;
}
int main() {
  int n, budget;
  cin >> n >> budget;
  vector<pair<int, int>> nums(n);
  for (int i = 0; i < n; ++i) {
    cin >> nums[i].first;
    nums[i].second = i + 1;
  }
  int res_count = 0;
  int res_sum = 0;
  int power = (1 << 17);
  while (power > 0) {
    if (res_count + power <= n) {
      int64 sum = MinSum(nums, res_count + power);
      if (sum <= budget) {
        res_sum = sum;
        res_count += power;
      }
    }
    power >>= 1;
  }
  cout << res_count << " " << res_sum << "\n";
  return 0;
}
