#include <bits/stdc++.h>
using namespace std;
template <typename T>
static ostream& operator<<(ostream& stream, const vector<T>& t);
template <typename T>
static istream& read(T, T, istream& = cin);
vector<int> f(int b, int k) {
  int start = b * (k / 2) + 1;
  int finish = (b + 1) * (k / 2);
  vector<int> tmp;
  for (int i = start; i <= finish; ++i) tmp.push_back(i);
  return tmp;
}
const int N = 1025;
bool old[N];
void reset() { cout << "R" << endl; }
bool seen(int x) {
  cout << "? " << x << endl;
  char res;
  cin >> res;
  return res == 'Y';
}
void test(vector<int> ls, vector<int> rs) {
  reset();
  for (int x : ls)
    if (seen(x)) {
      old[x] = true;
    }
  for (int x : rs) {
    if (seen(x)) {
      old[x] = true;
    }
  }
}
void test_limits() {
  for (int n = 1; n <= 1024; n *= 2) {
    for (int k = 1; k <= n; k *= 2) {
      if (3 * n * n > 15000ll * 2 * k) continue;
      int tk = max(k, 2);
      int queries = 0, resets = 0;
      for (int i = 0; i < 2 * n / tk; ++i)
        for (int j = i + 1; j <= (2 * n / tk) - 1; ++j) {
          queries += tk;
          resets += 1;
        }
      if (!(queries <= 3 * n * n / (2 * k))) {
        cerr << ("n") << " = " << n << "\t",
            cerr << ("k") << " = " << k << "\t",
            cerr << ("queries") << " = " << queries << '\n';
      }
      if (!(resets <= 30000)) {
        cerr << ("n") << " = " << n << "\t",
            cerr << ("k") << " = " << k << "\t",
            cerr << ("resets") << " = " << resets << '\n';
      }
    }
  }
  exit(0);
}
void __() {
  int n, k;
  cin >> n >> k;
  int tk = max(k, 2);
  int buckets = 2 * n / tk;
  vector<vector<int> > bucket_seq;
  for (int d = 1; d <= buckets; ++d) {
    for (int start = 0; start <= d - 1; ++start) {
      if (start + d >= buckets) continue;
      vector<int> seq(1, start);
      for (int i = start + d; i < buckets; i += d) seq.push_back(i);
      bucket_seq.push_back(seq);
    }
  }
  for (auto _ : bucket_seq) {
    reset();
    for (auto x : _) {
      vector<int> ls = f(x, tk);
      for (int x : ls)
        if (seen(x)) {
          old[x] = true;
        }
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i)
    if (!old[i]) ans++;
  cout << "! " << ans << endl;
}
int main() {
  cout << fixed << setprecision(15);
  __();
}
