#include <bits/stdc++.h>
using namespace std;
template <typename T>
void _dbg(const char* _s, T _h) {
  cerr << _s << " = " << _h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char* _s, T _h, Ts... _t) {
  int _b = 0;
  while (((_b += *_s == '(') -= *_s == ')') != 0 || *_s != ',') cerr << *_s++;
  cerr << " = " << _h << ",";
  _dbg(_s + 1, _t...);
}
const int64_t INF = static_cast<int64_t>(1e9) + 7;
const int64_t LINF = INF * INF;
const int MAXN = static_cast<int>(1e6) + 17;
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> vec(n, 0);
  for (int i = 1; i <= n; ++i) {
    cout << "? " << i << endl;
    cout.flush();
    char c;
    cin >> c;
    if (c == 'Y') {
      vec[i - 1] = 1;
    }
  }
  cout << "R\n";
  cout.flush();
  int k2 = max(1, k / 2);
  int n_groups = n / k2;
  for (int i = 0; i < n_groups; ++i) {
    for (int j = i + 1; j < n_groups; ++j) {
      for (int l = 0; l < k2; ++l) {
        int ind = l + i * k2;
        if (vec[ind] == 0) {
          cout << "? " << ind + 1 << endl;
          cout.flush();
          char c;
          cin >> c;
          assert(c == 'N');
        }
      }
      for (int l = 0; l < k2; ++l) {
        int ind = l + j * k2;
        if (vec[ind] == 0) {
          cout << "? " << ind + 1 << endl;
          cout.flush();
          char c;
          cin >> c;
          assert(c != 'E');
          if (c == 'Y') {
            vec[ind] = 1;
          }
        }
      }
      cout << "R\n";
      cout.flush();
    }
  }
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    ans += (vec[i] == 0);
  }
  cout << "! " << ans << endl;
  cout.flush();
}
int main() {
  cin.tie(nullptr);
  cout.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int q = 1;
  for (int i = 0; i < q; ++i) {
    solve();
  }
}
