#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 9;
int vec[MAX_N];
int main() {
  int N, M;
  while (cin >> N >> M) {
    memset(vec, 0, sizeof(vec));
    int sum = 0;
    for (int i = 0; i < N; i++) {
      int t;
      cin >> t;
      sum += t;
    }
    sum += N - 1;
    if (M == sum)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
