#include <bits/stdc++.h>
using namespace std;
bool ask(int c) {
  cout << "? " << c + 1 << "\n";
  cout.flush();
  char ans;
  cin >> ans;
  if (ans == 'N') return true;
  if (ans == 'E') exit(228);
  return false;
}
void reset() {
  cout << "R\n";
  cout.flush();
}
int main() {
  int n, k;
  cin >> n >> k;
  vector<bool> unique(n, true);
  int delta = k / 2;
  delta = (delta) ? delta : 1;
  for (int i = 0; i < n; i += delta) {
    for (int next_window = i + delta; next_window < n; next_window += delta) {
      for (int j = i; j < i + delta; ++j) {
        if (unique[j]) {
          unique[j] = ask(j);
        } else {
          ask(j);
        }
      }
      for (int j = next_window; j < next_window + delta; ++j) {
        if (unique[j]) {
          unique[j] = ask(j);
        } else {
          ask(j);
        }
      }
      reset();
    }
  }
  int count = 0;
  for (auto val : unique) {
    if (val) ++count;
  }
  cout << "! " << count << "\n";
  cout.flush();
  return 0;
}
