#include <iostream>
#include <string>
using namespace std;

int f(string s){
	int res = 0, i, j;
	for(i = 0; i < s.size(); i++){
		if(s[i] == '.'){
			j = i;
			while(s[j] == '.'){
				j++;
			}
			res += j - i - 1;
			i = j;
		}
	}
	return res;
}

int main(){
	int length, times, position, i;
	char replace_ch;
	string s;
	while(cin >> length >> times >> s){
		for(i = 0; i < times; i++){
			cin >> position >> replace_ch;
			s[position - 1] = replace_ch;
			cout << f(s) << endl;;
		}
	}
}