#include <bits/stdc++.h>
const int mod = 998244353;
using namespace std;
int n, k;
int x;
int v[2000000];
int ask(int t) {
  printf("? %d\n", t + 1);
  fflush(stdout);
  string ret;
  cin >> ret;
  return ret == "Y";
}
void ask(int a, int b) {
  for (int i = 0; i < x; ++i) {
    if (ask(a + i)) v[a + i] = 1;
  }
  for (int i = 0; i < x; ++i) {
    if (ask(b + i)) v[b + i] = 1;
  }
  printf("R\n");
  fflush(stdout);
}
int main() {
  cin >> n >> k;
  x = max(k / 2, 1);
  for (int i = 0; i < n; i += x) {
    for (int j = i + x; j < n; j += x) {
      ask(i, j);
    }
  }
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    if (!v[i]) ++ans;
  }
  printf("! %d\n", ans);
  fflush(stdout);
}
