Daniel has a string s, consisting of lowercase English letters and period signs (characters '.'). Let's define the operation of replacement as the following sequence of steps: find a substring ".." (two consecutive periods) in string s, of all occurrences of the substring let's choose the first one, and replace this substring with string ".". In other words, during the replacement operation, the first two consecutive periods are replaced by one. If string s contains no two consecutive periods, then nothing happens.

Let's define f(s) as the minimum number of operations of replacement to perform, so that the string does not have any two consecutive periods left.

You need to process m queries, the i-th results in that the character at position xi (1 ≤ xi ≤ n) of string s is assigned value ci. After each operation you have to calculate and output the value of f(s).

Help Daniel to process all queries.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 300 000) the length of the string and the number of queries.

The second line contains string s, consisting of n lowercase English letters and period signs.

The following m lines contain the descriptions of queries. The i-th line contains integer xi and ci (1 ≤ xi ≤ n, ci — a lowercas English letter or a period sign), describing the query of assigning symbol ci to position xi.

Output

Print m numbers, one per line, the i-th of these numbers must be equal to the value of f(s) after performing the i-th assignment.

Examples

Input

10 3
.b..bz....
1 h
3 c
9 f


Output

4
3
1


Input

4 4
.cc.
2 .
3 .
2 a
1 a


Output

1
3
1
1

Note

Note to the first sample test (replaced periods are enclosed in square brackets).

The original string is ".b..bz....".

  * after the first query f(hb..bz....) = 4 ("hb[..]bz...."  →  "hb.bz[..].."  →  "hb.bz[..]."  →  "hb.bz[..]"  →  "hb.bz.")
  * after the second query f(hbс.bz....) = 3 ("hbс.bz[..].."  →  "hbс.bz[..]."  →  "hbс.bz[..]"  →  "hbс.bz.")
  * after the third query f(hbс.bz..f.) = 1 ("hbс.bz[..]f."  →  "hbс.bz.f.")



Note to the second sample test.

The original string is ".cc.".

  * after the first query: f(..c.) = 1 ("[..]c."  →  ".c.")
  * after the second query: f(....) = 3 ("[..].."  →  "[..]."  →  "[..]"  →  ".")
  * after the third query: f(.a..) = 1 (".a[..]"  →  ".a.")
  * after the fourth query: f(aa..) = 1 ("aa[..]"  →  "aa.")
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
const int MOD = 10000000000000000007;
template <class T>
inline T sqr(const T x) {
  return x * x;
}
template <class T1, class T2>
inline T1 POW(const T1 x, const T2 y) {
  if (!y)
    return 1;
  else if ((y & 1) == 0) {
    return sqr(POW(x, y >> 1));
  } else
    return POW(x, y ^ 1) * x;
}
template <class T>
inline T GCD(const T x, const T y) {
  if (x < 0) return GCD(-x, y);
  if (y < 0) return GCD(x, -y);
  return (!y) ? x : GCD(y, x % y);
}
template <class T>
inline T LCM(const T x, const T y) {
  if (x < 0) return LCM(-x, y);
  if (y < 0) return LCM(x, -y);
  return x * (y / GCD(x, y));
}
template <class T>
inline T EEA(const T a, const T b, T &x, T &y) {
  if (a < 0) {
    T d = EEA(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = EEA(a, -b, x, y);
    y = -y;
    return d;
  }
  if (!b) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = EEA(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <class T>
inline vector<pair<T, int> > FACTORIZE(T x) {
  vector<pair<T, int> > ret;
  if (x < 0) x = -x;
  for (T i = 2; x > 1;) {
    if (x % i == 0) {
      int count = 0;
      for (; x % i == 0; x /= i) count++;
      ret.push_back(MP(i, count));
    }
    i++;
    if (i > x / i) i = x;
  }
  return ret;
}
template <class T>
inline int ISPRIME(const T x) {
  if (x <= 1) return 0;
  for (T i = 2; sqr(i) <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
template <class T>
inline T EULARFUNCTION(T x) {
  vector<pair<T, int> > f = FACTORIZE(x);
  for (typename vector<pair<T, int> >::iterator it = f.begin(); it != f.end();
       it++) {
    x = x / it->first * (it->first - 1);
  }
  return x;
}
template <class T>
inline T INVERSEE(const T a, const T b) {
  T x, y;
  EEA(a, b, x, y);
  return x ? x : 1;
}
template <class T>
inline T MOD_STD(const T x, const T m) {
  return (x % m + m) % m;
}
template <class T>
inline T MOD_STD(const T x) {
  return (x % MOD + MOD) % MOD;
}
template <class T>
inline T MOD_ADD(const T x, const T y, const T m) {
  return (x + y) % m;
}
template <class T>
inline T MOD_ADD(const T x, const T y) {
  return (x + y) % MOD;
}
template <class T>
inline void MOD_ADD(T *x, const T y, const T m) {
  *x = (*x + y) % m;
}
template <class T>
inline void MOD_ADD(T *x, const T y) {
  *x = (*x + y) % MOD;
}
template <class T>
inline T MOD_MUL(const T x, const T y, const T m) {
  return (T)((1LL * x * y) % m);
}
template <class T>
inline T MOD_MUL(const T x, const T y) {
  return (T)((1LL * x * y) % MOD);
}
template <class T>
inline void MOD_MUL(T *x, const T y, const T m) {
  *x = (T)((1LL * (*x) * y) % m);
}
template <class T>
inline void MOD_MUL(T *x, const T y) {
  *x = (T)((1LL * (*x) * y) % MOD);
}
template <class T1, class T2>
inline T1 MOD_POW(const T1 x, const T2 y, const T1 m) {
  if (y == 0)
    return 1 % m;
  else if ((y & 1) == 0) {
    T1 z = MOD_POW(x, y >> 1, m);
    return MOD_MUL(z, z, m);
  } else
    return MOD_MUL(MOD_POW(x, y ^ 1, m), x, m);
}
template <class T1, class T2>
inline T1 MOD_POW(const T1 x, const T2 y) {
  if (y == 0)
    return 1 % MOD;
  else if ((y & 1) == 0) {
    T1 z = MOD_POW(x, y >> 1);
    return MOD_MUL(z, z);
  } else
    return MOD_MUL(MOD_POW(x, y ^ 1), x);
}
const int N_MAX = 400000;
const int SUP_I = (int)1e+9;
const unsigned long long int SUP_LL = (unsigned long long int)1e+16;
const double EPS = 1e-6;
const double pi = 3.14159265358979323846;
const double E = 2.7182818284590452354;
double DEG(double x) { return (180.0 * x) / (pi); }
double RAD(double x) { return (x * (double)pi) / (180.0); }
template <typename T>
T DIS(T x1, T y1, T x2, T y2) {
  return sqrt((double)((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
}
template <typename T>
T ANGLE(T x1, T y1, T x2, T y2) {
  return atan(double(y1 - y2) / double(x1 - x2));
}
template <typename T>
long long isLeft(T a, T b, T c) {
  return (c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y);
}
char buffer[N_MAX];
class Comparator {
 public:
  bool operator()(char *a, char *b) { return (strcmp(a, b) < 0); }
};
string s;
int length, query;
int f() {
  int result = 0;
  int countDot = 0;
  int s_length = s.length();
  for (int i = 0; i < s_length; i++) {
    if (s[i] != '.') {
      if (countDot > 1) {
        result += (countDot - 1);
      }
      countDot = 0;
      continue;
    }
    if (s[i] == '.') countDot++;
  }
  if (countDot > 1) {
    result += (countDot - 1);
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> length >> query;
  cin >> s;
  s = "a" + s + "a";
  int position;
  char value;
  int lastCount = f();
  for (int i = 0; i < query; i++) {
    cin >> position >> value;
    ;
    if (value == '.') {
      if (s[position] == value) {
        cout << lastCount << '\n';
        continue;
      } else {
        s[position] = value;
        if (s[position - 1] != '.' && s[position + 1] != '.') {
          cout << lastCount << '\n';
          continue;
        } else if (s[position - 1] == '.' && s[position + 1] == '.') {
          lastCount += 2;
          cout << lastCount << '\n';
          continue;
        } else {
          lastCount += 1;
          cout << lastCount << '\n';
          continue;
        }
      }
    } else {
      if (s[position] != '.') {
        cout << lastCount << '\n';
        continue;
      } else {
        s[position] = value;
        if (s[position - 1] != '.' && s[position + 1] != '.') {
          cout << lastCount << '\n';
          continue;
        } else if (s[position - 1] == '.' && s[position + 1] == '.') {
          lastCount -= 2;
          cout << lastCount << '\n';
          continue;
        } else {
          lastCount -= 1;
          cout << lastCount << '\n';
          continue;
        }
      }
    }
  }
  return 0;
}
