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