#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;
int resets = 0, tastes = 0;
void reset() {
  resets++;
  cout << 'R' << endl;
  cout.flush();
}
bool taste(int x) {
  tastes++;
  char c = '?';
  cout << "? " << (x + 1) << endl;
  cout.flush();
  cin >> c;
  return c == 'N';
}
void answer(int d) {
  cout << "! " << d << endl;
  cout.flush();
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<bool> rep(n);
  int sz = max(1, k / 2);
  int b = n / sz;
  for (int g = 1; g < b; g++) {
    for (int i = 0; i < g; i++) {
      if (i + g >= b) continue;
      reset();
      for (int j = i; j < b; j += g) {
        for (int x = 0; x < sz; x++) {
          int y = j * sz + x;
          if (!taste(y)) rep[y] = true;
        }
      }
    }
  }
  int d = 0;
  for (auto i : rep) d += !i;
  answer(d);
  return 0;
}
