#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long INF = 1e10;
long long MOD = 1e9 + 7;
template <class T>
void out(T a) {
  cout << a << '\n';
}
template <class T>
void yesno(T b) {
  if (b)
    out("yes");
  else
    out("no");
}
template <class T>
void YesNo(T b) {
  if (b)
    out("Yes");
  else
    out("No");
}
template <class T>
void YESNO(T b) {
  if (b)
    out("YES");
  else
    out("NO");
}
template <class T>
void noyes(T b) {
  if (b)
    out("no");
  else
    out("yes");
}
template <class T>
void NoYes(T b) {
  if (b)
    out("No");
  else
    out("Yes");
}
template <class T>
void NOYES(T b) {
  if (b)
    out("NO");
  else
    out("YES");
}
long long keta(long long a) {
  long double b = a;
  b = log10(b);
  long long c = b;
  return c + 1;
}
long long kurai(long long a, long long b) {
  long long m = pow(10, b), n = pow(10, b - 1);
  return (a % m) / n;
}
long long ketawa(long long a) {
  long long k = 0;
  for (long long i = 0; i < keta(a); i++) {
    k += kurai(a, i + 1);
  }
  return k;
}
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long mid(long long a, long long b, long long c) {
  vector<long long> k(3);
  k[0] = a;
  k[1] = b;
  k[2] = c;
  sort(k.begin(), k.end());
  return k[1];
}
bool sosuu(long long a) {
  bool b = 1;
  if (a <= 1)
    return 0;
  else {
    for (long long i = 1; i <= sqrt(a) - 1; i++) {
      if (a % (i + 1) == 0) b = 0;
    }
    return b;
  }
}
long long modpow(long long a, long long b, long long m = MOD) {
  if (!b) return 1;
  if (b & 1) return modpow(a, b - 1, m) * a % m;
  long long memo = modpow(a, b >> 1, m);
  return memo * memo % m;
}
long long fact_mod(long long n) {
  long long f = 1;
  for (long long i = 2; i < n + 1; i++) f = f * (i % MOD) % MOD;
  return f;
}
long long mod_pow(long long x, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = (res * x) % MOD;
    x = (x * x) % MOD;
    n >>= 1;
  }
  return res;
}
long long c_mod(long long n, long long r) {
  if (r > n - r) r = n - r;
  if (r == 0) return 1;
  long long a = 1;
  for (long long i = 0; i < r; i++) a = a * ((n - i) % MOD) % MOD;
  long long b = mod_pow(fact_mod(r), MOD - 2);
  return (a % MOD) * (b % MOD) % MOD;
}
signed main() {
  long long a, b;
  cin >> a >> b;
  string c;
  cin >> c;
  bool d = 1;
  for (long long i = 0; i < c.size(); i++) {
    if (i + 1 <= a && !('0' <= c[i] && c[i] <= '9'))
      d = 0;
    else if (i + 1 == a + 1 && c[i] != '-')
      d = 0;
    else if (a + 1 < i + 1 && !('0' <= c[i] && c[i] <= '9'))
      d = 0;
  }
  out(d);
}
