Alice's hair is growing by leaps and bounds. Maybe the cause of it is the excess of vitamins, or maybe it is some black magic...

To prevent this, Alice decided to go to the hairdresser. She wants for her hair length to be at most l centimeters after haircut, where l is her favorite number. Suppose, that the Alice's head is a straight line on which n hairlines grow. Let's number them from 1 to n. With one swing of the scissors the hairdresser can shorten all hairlines on any segment to the length l, given that all hairlines on that segment had length strictly greater than l. The hairdresser wants to complete his job as fast as possible, so he will make the least possible number of swings of scissors, since each swing of scissors takes one second.

Alice hasn't decided yet when she would go to the hairdresser, so she asked you to calculate how much time the haircut would take depending on the time she would go to the hairdresser. In particular, you need to process queries of two types:

  * 0 — Alice asks how much time the haircut would take if she would go to the hairdresser now. 
  * 1 p d — p-th hairline grows by d centimeters. 



Note, that in the request 0 Alice is interested in hypothetical scenario of taking a haircut now, so no hairlines change their length.

Input

The first line contains three integers n, m and l (1 ≤ n, m ≤ 100 000, 1 ≤ l ≤ 10^9) — the number of hairlines, the number of requests and the favorite number of Alice.

The second line contains n integers a_i (1 ≤ a_i ≤ 10^9) — the initial lengths of all hairlines of Alice.

Each of the following m lines contains a request in the format described in the statement.

The request description starts with an integer t_i. If t_i = 0, then you need to find the time the haircut would take. Otherwise, t_i = 1 and in this moment one hairline grows. The rest of the line than contains two more integers: p_i and d_i (1 ≤ p_i ≤ n, 1 ≤ d_i ≤ 10^9) — the number of the hairline and the length it grows by.

Output

For each query of type 0 print the time the haircut would take.

Example

Input

4 7 3
1 2 3 4
0
1 2 3
0
1 1 3
0
1 3 1
0


Output

1
2
2
1

Note

Consider the first example:

  * Initially lengths of hairlines are equal to 1, 2, 3, 4 and only 4-th hairline is longer l=3, and hairdresser can cut it in 1 second. 
  * Then Alice's second hairline grows, the lengths of hairlines are now equal to 1, 5, 3, 4 
  * Now haircut takes two seonds: two swings are required: for the 4-th hairline and for the 2-nd. 
  * Then Alice's first hairline grows, the lengths of hairlines are now equal to 4, 5, 3, 4 
  * The haircut still takes two seconds: with one swing hairdresser can cut 4-th hairline and with one more swing cut the segment from 1-st to 2-nd hairline. 
  * Then Alice's third hairline grows, the lengths of hairlines are now equal to 4, 5, 4, 4 
  * Now haircut takes only one second: with one swing it is possible to cut the segment from 1-st hairline to the 4-th. 
import static java.lang.String.format;

import java.io.*;

import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * https://codeforces.com/contest/1054/problem/B
 */
public class Solution1055B {

    private static ByteArrayOutputStream interceptedStream = new ByteArrayOutputStream();
    private static PrintStream systemOut = System.out;
    private static InputReader in  = new InputReader(System.in);
    private static PrintWriter out = new PrintWriter(System.out);



    public static void main(String[] args) throws IOException {

//        testCount();
//
//        String testFile = "Mail.Ru Cup 2018 Раунд 2/test/%s.txt";
//        String testAnsw = "Mail.Ru Cup 2018 Раунд 2/test/%sa.txt";
//
//        for (int k = 1; k <= 10; k++) {
//
//            enableTestFromFile(format(testFile, k));
//            solve();
//
//            long[] ans = getResultsFromInterceptedStream();
//            Assert.assertEquals(ans, $.readFileAsLong(format(testAnsw, k)));
//
//            out.flush();
//        }

        solve();
        out.flush();
        out.close();
    }

    static void solve() {

        int n = in.nextInt();
        int m = in.nextInt();
        long l = in.nextLong();

        long[] a = in.readArrayLong(n);

        // t - 0 or 1
        // p - index of heir to grow
        // d - length of grow
        int t, p, d;

        int count = count(n, l, a);

        for (int i = 0; i < m; i++) {
            t = in.nextInt();

            if (t == 0) out.println(count);
            if (t == 1) {
                p = in.nextInt() - 1;
                d = in.nextInt();

                a[p] = a[p] + d;

                if (a[p] > l && a[p] - d <= l) {

                    if (n == 1) {
                        count++;
                        continue;
                    }

                    if (p > 0 && p < n - 1) {
                        if (a[p - 1] <= l && a[p + 1] <= l) count++;
                        if (a[p - 1] > l  && a[p + 1] > l)  count--;
                    }
                    if (p == 0     && a[p + 1] <= l) count++;
                    if (p == n - 1 && a[p - 1] <= l) count++;
                }
            }
        }
    }

    // n - number of hair
    // l - favorite number
    // a - length of each heir
    private static int count(int n, long l, long[] a) {

        int count = 0;
        boolean start = true;

        for (int i = 0; i < n; i++) {
            if (a[i] <= l) {
                start = true;
            } else if (start) {
                count++;
                start = false;
            }
        }
        return count;
    }


    private static void testCount() {
        Assert.assertEquals(count(4, 3, new long[]{1, 2, 3, 4}), 1);
        Assert.assertEquals(count(4, 3, new long[]{1, 5, 3, 4}), 2);
        Assert.assertEquals(count(4, 3, new long[]{4, 5, 3, 4}), 2);
        Assert.assertEquals(count(4, 3, new long[]{4, 5, 4, 4}), 1);

        Assert.assertEquals(count(6, 3, new long[]{1, 2, 3, 4, 5, 6}), 1);
        Assert.assertEquals(count(6, 3, new long[]{1, 4, 3, 4, 3, 6}), 3);

        Assert.assertEquals(count(6, 3, new long[]{1, 2, 3, 3, 3, 3}), 0);
        Assert.assertEquals(count(6, 3, new long[]{4, 4, 4, 4, 4, 4}), 1);
        Assert.assertEquals(count(6, 3, new long[]{1, 4, 4, 4, 4, 1}), 1);
        Assert.assertEquals(count(6, 3, new long[]{1, 1, 4, 4, 1, 1}), 1);
        Assert.assertEquals(count(6, 3, new long[]{1, 1, 4, 4, 4, 4}), 1);
        Assert.assertEquals(count(6, 3, new long[]{4, 4, 4, 4, 4, 1}), 1);
        Assert.assertEquals(count(6, 3, new long[]{4, 4, 4, 4, 1, 1}), 1);
        Assert.assertEquals(count(6, 3, new long[]{4, 4, 3, 3, 4, 4}), 2);
        Assert.assertEquals(count(6, 3, new long[]{4, 3, 3, 3, 3, 4}), 2);
        Assert.assertEquals(count(6, 3, new long[]{4, 3, 4, 3, 4, 4}), 3);
    }


    private static void enableTestFromFile(String fileName) throws IOException {
        System.setOut(new PrintStream(interceptedStream));
        out = new PrintWriter(System.out);
        in = new InputReader(new File(fileName));
    }


    private static long[] getResultsFromInterceptedStream() {
        out.flush();
        String[] stringArray = interceptedStream.toString().split("\r\n");

        interceptedStream.reset();
        System.setOut(systemOut);
        out = new PrintWriter(System.out);

        return $.arrayStringToLong(stringArray);
    }


    /**
     * Assert method for testing.
     */
    static class Assert {

        static void assertEquals(int actual, int expected) {
            if (actual != expected) {
                throw new RuntimeException("\n" + actual + " != "  + expected);
            }
        }

        static void assertEquals(long actual, long expected) {
            if (actual != expected) {
                throw new RuntimeException("\n" + actual + " != "  + expected);
            }
        }

        static void assertEquals(int[] actual, int[] expected) {
            if (!Arrays.equals(actual, expected)) {
                throw new RuntimeException("\n" + Arrays.toString(actual)
                    + "\n" + Arrays.toString(expected));
            }
        }

        static void assertEquals(long[] actual, long[] expected) {
            if (!Arrays.equals(actual, expected)) {
                throw new RuntimeException("\n" + Arrays.toString(actual)
                                         + "\n" + Arrays.toString(expected));
            }
        }
    }


    /**
     * Class for read input.
     */
    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        /**
         * Read from file.
         */
        InputReader(File file) throws FileNotFoundException {
            reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)), 32768);
            tokenizer = null;
        }

        /**
         * Read from stream.
         */
        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        boolean hasNext() {
            try {
                return reader.ready();
            } catch (IOException e) {
                e.printStackTrace();
                return false;
            }
        }

        String next() {

            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        long nextLong() {
           return Long.parseLong(next());
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            int[] array = new int[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        long[] readArrayLong(int n) {
            long[] array = new long[n];
            for (int i = 0; i < n; i++) {

                array[i] = nextLong();
            }
            return array;
        }

        long[][] readDoubleArrayLong(int n) {
            long[][] array = new long[n][2];
            for (int i = 0; i < n; i++) {

                array[i][0] = nextLong();
                array[i][1] = nextLong();
            }
            return array;
        }
    }

    /**
     * Util class with different util methods.
     */
    static class $ {

        static int[] ints(int... args) {
            return args;
        }

        static long[] longs(long... args) {
            return args;
        }

        static String[] strings(String... args) {
            return args;
        }

        static long[] arrayStringToLong(String[] stringArray) {
            long[] longArray = new long[stringArray.length];

            for (int i = 0; i < stringArray.length; i++) {
                longArray[i] = Long.parseLong(stringArray[i]);
            }
            return longArray;
        }

        static int[] arrayStringToInt(String[] stringArray) {
            int[] intArray = new int[stringArray.length];

            for (int i = 0; i < stringArray.length; i++) {
                intArray[i] = Integer.parseInt(stringArray[i]);
            }
            return intArray;
        }

        static long GCD(long a, long b) {
            return b == 0 ? a : GCD(b, a % b);
        }

        static boolean isPrime(long n) {
            if (n == 1) return false;

            long limit = (long) Math.sqrt(n);
            for (long i = 2; i <= limit; i++) {
                if (n % i == 0) return false;
            }
            return true;
        }

        static String[] readFile(String fileName) {
            List<String> list = new ArrayList<>();

            try (Stream<String> stream = Files.lines(Paths.get(fileName))) {
                list = stream.collect(Collectors.toList());
            } catch (IOException e) {
                e.printStackTrace();
            }
            return list.toArray(new String[0]);
        }

        static long[] readFileAsLong(String fileName) {
            return arrayStringToLong(readFile(fileName));
        }

        static int[] readFileAsInt(String fileName) {
            return arrayStringToInt(readFile(fileName));
        }
    }



}