#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k, i, ans = 0, j, c = 1;
  char res;
  cin >> n >> k;
  if (k == 1) k = 2;
  if (n == 1) {
    cout << "! 1" << endl;
    return 0;
  }
  k = k / 2;
  set<long long> v[n / k];
  for (i = 0; i < n / k; i++) {
    for (j = 0; j < k; j++) {
      cout << "? " << j + c << endl;
      cin >> res;
      if (res == 'N') v[i].insert(j + c);
    }
    c += k;
    cout << "R" << endl;
  }
  for (i = 0; i < n / k; i++)
    for (j = i + 1; j < n / k; j++) {
      if (v[i].size() == 0 or v[j].size() == 0) continue;
      for (auto ele : v[i]) {
        cout << "? " << ele << endl;
        cin >> res;
      }
      auto itr = v[j].begin();
      while (itr != v[j].end()) {
        cout << "? " << *itr << endl;
        cin >> res;
        c = *itr;
        if (res == 'Y') v[j].erase(itr);
        itr = v[j].upper_bound(c);
      }
      cout << "R" << endl;
    }
  ans = 0;
  for (i = 0; i < n / k; i++) ans += v[i].size();
  cout << "! " << ans << endl;
  return 0;
}
