import java.util.Scanner;
public class Main {
public static void main
(String[] args
) { Scanner scanner
= new Scanner
(System.
in); long n = scanner.nextLong();
long k = scanner.nextLong();
long[] b = new long[(int) n];
for (int i = 0; i < n; i++) {
b[i] = scanner.nextLong();
}
long count = 0;
for (int i = 0; i < n; i++) {
long sum = 0;
for (int j = i; j < n; j++) {
sum += b[j];
if (sum <= k) {
count++;
}
}
}
scanner.close();
}
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwogCnB1YmxpYyBjbGFzcyBNYWluIHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIGxvbmcgbiA9IHNjYW5uZXIubmV4dExvbmcoKTsKICAgICAgICBsb25nIGsgPSBzY2FubmVyLm5leHRMb25nKCk7CiAgICAgICAgbG9uZ1tdIGIgPSBuZXcgbG9uZ1soaW50KSBuXTsKIAogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgICAgIGJbaV0gPSBzY2FubmVyLm5leHRMb25nKCk7CiAgICAgICAgfQogCiAgICAgICAgbG9uZyBjb3VudCA9IDA7CiAKICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgICAgICAgICBsb25nIHN1bSA9IDA7CiAgICAgICAgICAgIGZvciAoaW50IGogPSBpOyBqIDwgbjsgaisrKSB7CiAgICAgICAgICAgICAgICBzdW0gKz0gYltqXTsKICAgICAgICAgICAgICAgIGlmIChzdW0gPD0gaykgewogICAgICAgICAgICAgICAgICAgIGNvdW50Kys7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oY291bnQpOwogICAgICAgIHNjYW5uZXIuY2xvc2UoKTsKICAgIH0KfQog