#include <bits/stdc++.h>
using namespace std;
bool ask(int val) {
  cout << "? " << val + 1 << endl;
  string resp;
  cin >> resp;
  return resp[0] == 'Y' ? true : false;
}
void fix() { cout << "R" << endl; }
int main() {
  int n, k;
  cin >> n >> k;
  vector<bool> check(n + 1, 0);
  int block = k % 2 ? 1 : k / 2;
  for (int blockno = 1; blockno < n / block; blockno += 1) {
    for (int j = 0; j < blockno && (blockno + j < n / block); j += 1) {
      for (int k = j; k < n / block; k += blockno) {
        for (int a = 0; a < block; a += 1) {
          if (ask(k * block + a)) {
            check[k * block + a + 1] = true;
          }
        }
      }
      fix();
    }
  }
  int res = 0;
  for (int i = 1; i <= n; i += 1) {
    if (check[i] == 0) {
      res += 1;
    }
  }
  cout << "! " << res << endl;
}
