#include <bits/stdc++.h>
int vis[2005];
char s[5];
int max(int a, int b) { return a > b ? a : b; }
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    printf("? %d\n", i);
    fflush(stdout);
    scanf("%s", s + 1);
    if (s[1] == 'Y') vis[i] = 1;
  }
  int block = max(k / 2, 1);
  int count = n / block;
  for (int i = 1; i <= count; i++) {
    for (int j = i + 2; j <= count; j++) {
      printf("R\n");
      int l = (i - 1) * block + 1, r = i * block;
      for (int it = l; it <= r; it++) {
        if (!vis[it]) {
          printf("? %d\n", it);
          fflush(stdout);
          scanf("%s", s + 1);
        }
      }
      l = (j - 1) * block + 1, r = j * block;
      for (int it = l; it <= r; it++) {
        if (!vis[it]) {
          printf("? %d\n", it);
          fflush(stdout);
          scanf("%s", s + 1);
          if (s[1] == 'Y') vis[it] = 1;
        }
      }
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) ans += (vis[i] == 0);
  printf("! %d\n", ans);
  return 0;
}
