#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  int j = 0;
  for (int i = 0; i <= A - 1; i++) {
    if (0 > S[i] || 9 < S[i]) j = 1;
  }
  if (S[A] != '-') j = 1;
  for (int i = A + 1; i <= A + B - 1; i++) {
    if (0 > S[i] || 9 < S[i]) j = 1;
  }
  return 0;
}
