#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
  return os << "<" << p.first << "," << p.second << ">";
}
template <typename... T>
ostream& operator<<(ostream& os, const vector<T...>& c) {
  if (c.empty()) return os << "{ }";
  auto iter = c.cbegin();
  os << "{ " << *iter;
  while (++iter != c.cend()) os << ", " << *iter;
  return os << " }";
};
template <typename... T>
ostream& operator<<(ostream& os, const set<T...>& c) {
  if (c.empty()) return os << "{ }";
  auto iter = c.cbegin();
  os << "{ " << *iter;
  while (++iter != c.cend()) os << ", " << *iter;
  return os << " }";
};
template <typename... T>
ostream& operator<<(ostream& os, const map<T...>& c) {
  if (c.empty()) return os << "{ }";
  auto iter = c.cbegin();
  os << "{ " << *iter;
  while (++iter != c.cend()) os << ", " << *iter;
  return os << " }";
};
void dbg() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg(Head h, Tail... t) {
  cerr << " " << h;
  dbg(t...);
}
template <typename T>
T& minn(T& x, const T& y) {
  return x = min(x, y);
}
template <typename T>
T& maxx(T& x, const T& y) {
  return x = max(x, y);
}
constexpr const int mod = 1000000007;
constexpr int add(int a, int b) { return a + b < mod ? a + b : a + b - mod; }
constexpr int sub(int a, int b) { return a < b ? mod + a - b : a - b; }
constexpr int mul(int a, int b) { return 1LL * a * b % mod; }
template <typename... T>
constexpr int add(int a, int b, T... c) {
  return add(add(a, b), c...);
};
template <typename... T>
constexpr int sub(int a, int b, T... c) {
  return sub(sub(a, b), c...);
};
template <typename... T>
constexpr int mul(int a, int b, T... c) {
  return mul(mul(a, b), c...);
};
constexpr int square(int a) { return mul(a, a); }
constexpr int fpow(int a, int b) {
  return b ? mul(b & 1 ? a : 1, square(fpow(a, b >> 1))) : 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k;
  cin >> n >> k;
  int b = max(k >> 1, 1);
  int m = n / b;
  vector<int> vis(n);
  auto ask = [&](int i) -> void {
    if (vis[i]) return;
    char c;
    cout << "? " << i + 1 << endl;
    cin >> c;
    vis[i] |= c == 'Y';
  };
  auto reset = []() -> void { cout << "R" << endl; };
  for (int i = 0; i < int(m >> 1); ++i) {
    for (int j = 0; j < int(m); ++j) {
      int x = j + 1 >> 1;
      int y = ((j & 1 ? i - x : i + x) + m) % m;
      for (int w = 0; w < int(b); ++w) ask(y * b + w);
    }
    reset();
  }
  cout << "! " << n - accumulate(vis.cbegin(), vis.cend(), 0) << endl;
}
