#include <bits/stdc++.h>
using namespace std;
int hash[105];
int main() {
  int n, m;
  cin >> n >> m;
  string s;
  cin >> s;
  int ans = 0, st = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] != '.') {
      ans += max(0, st - 1);
      st = 0;
    } else {
      st++;
    }
  }
  ans += max(0, st - 1);
  for (long long i = 0; i < m; i++) {
    int x;
    string s2;
    cin >> x;
    cin >> s2;
    x--;
    if (s2[0] == '.' && s[x] != '.') {
      if (x == n - 1) {
        if (s[x - 1] == '.') {
          ans++;
        }
      } else if (x == 0) {
        if (s[x + 1] == '.') {
          ans++;
        }
      } else {
        if (s[x - 1] == '.') {
          ans++;
        }
        if (s[x + 1] == '.') {
          ans++;
        }
      }
    } else if (s2[0] != '.' && s[x] == '.') {
      if (x == n - 1) {
        if (s[x - 1] == '.') {
          ans--;
        }
      } else if (x == 0) {
        if (s[x + 1] == '.') {
          ans--;
        }
      } else {
        if (s[x - 1] == '.') {
          ans--;
        }
        if (s[x + 1] == '.') {
          ans--;
        }
      }
    }
    s[x] = s2[0];
    cout << ans << endl;
  }
  return 0;
}
