#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long a = 0, fh = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') fh = -1;
    c = getchar();
  }
  while ('0' <= c && c <= '9') {
    a = a * 10 + c - 48;
    c = getchar();
  }
  return a * fh;
}
long long n, k, vis[200005], ans;
long long TOT = 0;
void chk(vector<long long>& p, long long pos) {
  for (long long j = 0; j < p.size(); ++j) {
    long long i = p[j];
    cout << "? " << i << endl;
    TOT++;
    char c;
    cin >> c;
    if (c == 'Y' && j >= pos) vis[i] = 1;
  }
}
void solve() {
  long long cnt = 0;
  for (long long len = k; len <= n; len += k) {
    vector<long long> p(0);
    for (long long i = 1; i <= len; i += k) {
      long long j = i + len;
      if (j + k - 1 > n) continue;
      vector<long long> p(0);
      for (long long j = i; j < i + k; ++j) p.push_back(j);
      chk(p, 0);
      for (long long j = i + len; j + k - 1 <= n; j += len) {
        p.clear();
        cnt++;
        for (long long l = j; l < j + k; ++l) p.push_back(l);
        chk(p, 0);
      }
      cout << "R" << endl;
    }
  }
}
signed main() {
  ans = n = read();
  k = read();
  k = (k + 1) >> 1;
  solve();
  for (long long i = 1; i <= n; ++i)
    if (vis[i]) ans--;
  cout << "! " << ans << endl;
  return 0;
}
