#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAX = 1e5 + 5;
const long long MAX2 = 11;
const long long MOD = 998244353;
const long long MOD2 = 1000000006;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 316;
int n, k, ans, z;
bool st[MAX];
char c;
inline void get(int i) {
  cout << "? " << i << endl;
  cin >> c;
  if (c == 'Y') st[i] = false;
  return;
}
int main() {
  cin >> n >> k;
  memset(st, 1, sizeof st);
  if (n == k)
    for (int i = 1; i <= n; ++i) get(i);
  else if (k == 1) {
    for (int i = 1; i <= n; ++i) {
      for (int j = i + 1; j <= n; ++j) {
        get(i);
        get(j);
        cout << "R" << endl;
      }
    }
  } else {
    k >>= 1;
    for (int i = 1; i <= n / k; ++i) {
      for (int j = i + 1; j <= n / k; ++j) {
        for (int o = (i - 1) * k + 1; o <= i * k; ++o) get(o);
        for (int o = (j - 1) * k + 1; o <= j * k; ++o) get(o);
        cout << "R" << endl;
      }
    }
  }
  for (int i = 1; i <= n; ++i) ans += st[i];
  cout << "! " << ans << endl;
  return 0;
}
