Problem: 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.")

Solution (in JAVA):

Solution:
import javax.print.attribute.standard.MediaPrintableArea;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

/**
 * Created by Firеfly on 1/1/2017.
 */
public class Task {
    public static void main(String[] args) throws IOException {
        Emaxx emaxx = new Emaxx();
    }
}


class Emaxx {
    FScanner fs;
    PrintWriter pw;
    int n, m;
    ArrayList<Integer>[] graph;
    int[] comp;
    LinkedList<Pair> qoue;
    Emaxx() throws IOException {
        fs = new FScanner(new InputStreamReader(System.in));
        // pw = new PrintWriter(new FileWriter("arithnumbers.out"));
        //  fs = new FScanner(new FileReader("C:\\Users\\Firеfly\\Desktop\\New Text Document.txt"));
        //     fs = new FScanner(new FileReader("input.txt"));;
        //       pw = new PrintWriter("output.txt");
        PrintWriter pw = new PrintWriter(System.out);
        int n = fs.nextInt(), m = fs.nextInt();
        char[] mas = fs.nextLine().toCharArray();
        int punct = 0;
        int di = 0;
        boolean here = false;
        for (int i = 0; i<n; i++) {
            if (mas[i] == '.')
            {
                punct++;
                here = true;
            } else if (here) {
                di++;
                here = false;
            }
        }
        if (mas[n-1] == '.')
            di++;
        for (int i = 0; i<m; i++) {
            int q = fs.nextInt();
            char c = fs.nextToken().charAt(0);
            if (c == '.' && mas[q-1] == '.' || c !='.' && mas[q-1] != '.')
                pw.println(punct-di);
            else if (c == '.' && mas[q-1] != '.') {
                if (q == n)
                {
                    if (n == 1)
                        pw.println(0);
                    else {
                        if (mas[q-2] == '.')
                            punct++;
                        else {
                            punct++;
                            di++;
                        }
                        pw.println(punct-di);
                    }
                } else if (q == 1) {
                    if (n == 1)
                        pw.println(1);
                    else {
                        if (mas[q] == '.')
                            punct++;
                        else {
                            punct++;
                            di++;
                        }
                        pw.println(punct-di);
                    }
                } else {
                    if (mas[q] == '.' && mas[q-2] == '.')
                    {
                        punct++;
                        di--;
                    }
                    else if (mas[q]!= '.' && mas[q-2] != '.')
                    {
                        punct++;
                        di++;
                    } else
                        punct++;
                    pw.println(punct-di);
                }
            } else {
                if (q == n)
                {
                    if (n == 1)
                        pw.println(0);
                    else {
                        if (mas[q-2] == '.')
                            punct--;
                        else {
                            punct--;
                            di--;
                        }
                        pw.println(punct-di);
                    }
                } else if (q == 1) {
                    if (n == 1)
                        pw.println(0);
                    else {
                        if (mas[q] == '.')
                            punct--;
                        else {
                            punct--;
                            di--;
                        }
                        pw.println(punct-di);
                    }
                } else {
                    if (mas[q] == '.' && mas[q-2] == '.')
                    {
                        punct--;
                        di++;
                    }
                    else if (mas[q]!= '.' && mas[q-2] != '.')
                    {
                        punct--;
                        di--;
                    }
                    else
                        punct--;
                    pw.println(punct-di);
                }
            }
            mas[q-1] = c;
        }
        pw.close();
    }

    double round(double number, int scale) {
        int pow = 10;
        for (int i = 1; i < scale; i++)
            pow *= 10;
        double tmp = number * pow;
        return (double) (int) ((tmp - (int) tmp) >= 0.5 ? tmp + 1 : tmp) / pow;
    }

    int gcd(int a, int b) {
        if (b == 0)
            return a;
        else return gcd(b, a%b);
    }
}
class Tree1 {
    int[] t;
    int n;
    Tree1(ArrayList<Pair> a) {
        n = a.size();
        t = new int[n*4];
        build(a, 1, 0, n-1);
    }
    void build (ArrayList<Pair> a, int v, int tl, int tr) {
        if (tl == tr)
            t[v] = a.get(tl).x;
        else {
            int tm = (tl + tr) / 2;
            build (a, v*2, tl, tm);
            build (a, v*2+1, tm+1, tr);
            t[v] = Math.max(t[v*2], t[v*2+1]);
        }
    }
    int sum (int v, int tl, int tr, int l, int r) {
        if (l > r)
            return 0;
        if (l == tl && r == tr)
            return t[v];
        int tm = (tl + tr) / 2;
        return Math.max(sum (v*2, tl, tm, l, Math.min(r,tm))
                , sum (v*2+1, tm+1, tr, Math.max(l,tm+1), r));
    }
    void update (int v, int tl, int tr, int pos, int new_val) {
        if (tl == tr)
            t[v] = new_val;
        else {
            int tm = (tl + tr) / 2;
            if (pos <= tm)
                update (v*2, tl, tm, pos, new_val);
            else
                update (v*2+1, tm+1, tr, pos, new_val);
            t[v] = Math.max(t[v*2], t[v*2+1]);
        }
    }

}
class FScanner {
    BufferedReader br;
    StringTokenizer st;
    FScanner(InputStreamReader isr) {
        br = new BufferedReader(isr);
    }

    FScanner(FileReader fr) {
        br = new BufferedReader(fr);
    }

    String nextToken() throws IOException{
        while (st == null || !st.hasMoreTokens()) {
            String s = br.readLine();
            if (s == null)
                return null;
            st = new StringTokenizer(s);
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextLine() throws IOException {
        return br.readLine();
    }

    char nextChar() throws IOException {
        return (char) br.read();
    }
}

class Pair implements Comparable<Pair>{
    int x, y;
    boolean used;
    Pair(int x1, int y1) {x = x1; y = y1;}

    @Override
    public int compareTo(Pair o) {
        return Integer.compare(y, o.y);
    }
}