#include <bits/stdc++.h>
const int maxn = 3e3 + 5;
using namespace std;
int rd() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * f;
}
int n, m, tag[maxn], ans, B, k, d = 0;
char c;
bool ask(int x) {
  printf("? %d\n", x);
  cout.flush();
  cin >> c;
  return c == 'Y';
}
void query(int p) {
  for (int i = p * B + 1; i <= (p + 1) * B; i++)
    if (!tag[i] && ask(i)) tag[i] = 1, ans--;
}
int main() {
  n = rd();
  k = rd();
  B = max(1, k / 2);
  m = n / B;
  ans = n;
  for (int i = 0; i <= n / k - 1; i++) {
    if (i) puts("R"), cout.flush();
    d = 0;
    for (int j = 1; j <= m; j++) query((i + d + m) % m), d = (d <= 0) - d;
  }
  printf("! %d\n", ans);
  cout.flush();
  return 0;
}
