func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     cin >> n >> m;     vector<char> s(n);     long long ans = 0;     for (int i = 0; i < n; ++i) {       cin >> s[i];       if (i > 0 and s[i] ==  .  and s[i - 1] ==  . ) ++ans;     }     for (int i = 0; i < m; ++i) {       int pos;       cin >> pos;       --pos;       char c;       cin >> c;       if (c ==  .  and s[pos] !=  . ) {         if (pos > 0 and s[pos - 1] ==  . ) ++ans;         if (pos < n and s[pos + 1] ==  . ) ++ans;       } else if (c !=  .  and s[pos] ==  . ) {         if (pos > 0 and s[pos - 1] ==  . ) --ans;         if (pos < n and s[pos + 1] ==  . ) --ans;       }       s[pos] = c;       cout << ans <<   n ;     }   }   