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

const int N = (int)100;

long long
n, S, a[N + 5], ans;

void nhap(){
	cin >> n >> S;
	for(int i = 1; i <= n; i++) cin >> a[i];
}
void solve(){
	for(int L = 1; L <= n; L++){
		for(int R = L; R <= n; R++){
			long long csum = 0; //lưu tổng đoạn [L; R];
			for(int i = L; i <= R; i++){
				csum += a[i];
			}
			if(abs(csum) > S) ans++;
		}
	}
	cout << ans;
}
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	nhap();
	solve();
	return 0;
}