#include <bits/stdc++.h>
using namespace std;
int n, k, B, cnt;
char op;
bool vis[2010];
bool ask(int x) {
  printf("? %d\n", x), fflush(stdout);
  scanf(" %c", &op);
  return op == 'Y';
}
int main() {
  scanf("%d%d", &n, &k), B = max(1, k / 2), cnt = n / B;
  for (int d = 0; d < cnt; d++)
    for (int st = 0; st < d && st + d < cnt; st++) {
      puts("R");
      fflush(stdout);
      for (int i = st; i < cnt; i += d) {
        for (int j = i * B + 1; j <= (i + 1) * B; j++)
          if (!vis[j]) vis[j] = ask(j);
      }
    }
  int ans = n;
  for (int i = 1; i <= n; i++)
    if (vis[i]) ans--;
  printf("! %d\n", ans);
  fflush(stdout);
}
