#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, j, k, s = 0;
  cin >> n >> m;
  vector<long long int> a(n);
  for (i = 0; i < n; i++) cin >> a[i], s += a[i] + 1;
  s--;
  if (m == s)
    cout << "YES";
  else
    cout << "NO";
}
