func_code_string: #include <bits/stdc++.h>   using namespace std;   string s;   long long int n, m, c, ans = 0;   string x;   void count() {     int v = 0;     for (long long int i = 0; i < n; i++) {       if (s[i] ==  . ) {         v++;       } else {         if (v > 0) {           ans += (v - 1);           v = 0;         }       }     }     if (s[n - 1] ==  . ) ans += v - 1;   }   int main() {     cin >> n >> m;     cin >> s;     count();     for (long long int i = 1; i <= m; i++) {       cin >> c >> x;       if ((s[c - 1] ==  .  && x[0] ==  . ) || (s[c - 1] !=  .  && x[0] !=  . )) {       } else if (s[c - 1] !=  .  && x[0] ==  . ) {         if (s[c - 2] ==  .  && s[c] ==  . ) {           ans += 2;         } else if (s[c] ==  .  || s[c - 2] ==  . ) {           ans += 1;         }       } else if (s[c - 1] ==  .  && x[0] !=  . ) {         if (s[c - 2] ==  .  && s[c] ==  . ) {           ans -= 2;         } else if (s[c] ==  .  || s[c - 2] ==  . ) {           ans -= 1;         }       }       cout << ans << endl;       s[c - 1] = x[0];     }   }   