#include <bits/stdc++.h>
using namespace std;
int city_cnt[105];
int n, m;
int ans;
char str[300005];
int main(void) {
  while (2 == scanf("%d %d", &n, &m)) {
    scanf("%s", str);
    int len = n;
    set<int> myset;
    set<int>::iterator itlow;
    ans = 0;
    myset.insert(0);
    myset.insert(len + 1);
    for (int i = 0; i < len; i++) {
      if (str[i] != '.') {
        myset.insert(i + 1);
      }
    }
    for (set<int>::iterator it = myset.begin(); it != myset.end(); ++it) {
      if (*it == 0) continue;
      int a = *it;
      int b = *(--it);
      it++;
      int cnt = (a - b - 2);
      ans += cnt > 0 ? cnt : 0;
    }
    for (int i = 0; i < m; i++) {
      int a;
      char c;
      scanf("%d %c", &a, &c);
      if (c == '.') {
        itlow = myset.lower_bound(a);
        int cur = *itlow;
        if (cur == a) {
          int up = *(++itlow);
          itlow--;
          int down = *(--itlow);
          if (up - down != 2)
            if (up - cur == 1 || cur - down == 1)
              ans += 1;
            else
              ans += 2;
          myset.erase(cur);
        }
      } else {
        itlow = myset.lower_bound(a);
        int cur = *itlow;
        if (cur != a) {
          int up = *(++itlow);
          itlow--;
          int down = *(--itlow);
          if (cur - down != 2)
            if (cur - a == 1 || a - down == 1)
              ans -= 1;
            else
              ans -= 2;
          myset.insert(a);
        }
      }
      printf("%d\n", ans);
    }
  }
  return 0;
}
