Problem: Write a program which manipulates a sequence A = {a1, a2, . . . , an} with the following operations:

* add(s, t, x): add x to as, as+1, ..., at.
* get(i): output the value of ai.



Note that the initial values of ai (i = 1, 2, . . . , n) are 0.

Constraints

* 1 ≤ n ≤ 100000
* 1 ≤ q ≤ 100000
* 1 ≤ s ≤ t ≤ n
* 1 ≤ i ≤ n
* 0 ≤ x ≤ 1000

Input


n q
query1
query2
:
queryq


In the first line, n (the number of elements in A) and q (the number of queries) are given. Then, ith query queryi is given in the following format:


0 s t x


or


1 t


The first digit represents the type of the query. '0' denotes add(s, t, x) and '1' denotes get(i).

Output

For each get operation, print the value.

Examples

Input

3 5
0 1 2 1
0 2 3 2
0 3 3 3
1 2
1 3


Output

3
5


Input

4 3
1 2
0 1 4 1
1 2


Output

0
1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

// Dual Segment Tree
template <class OM> struct DST {
    int n, lev;
    vector<OM> lz;
    virtual OM h(OM, OM) = 0;
    const OM e0;

    DST(int n_, const OM& e0) : e0(e0) {
        for (n = 1, lev = 0; n < n_; n <<= 1, ++lev);
        lz.assign(n << 1, e0);
    }

    inline void push(int k) {
        for (int i = lev; i > 0; --i) {
            int j = k >> i;
            if (lz[j] == e0) continue;
            lz[(j << 1) | 0] = h(lz[(j << 1) | 0], lz[j]);
            lz[(j << 1) | 1] = h(lz[(j << 1) | 1], lz[j]);
            lz[j] = e0;
        }
    }

    // [l, r)
    // l, r: 0-indexed
    void update(int l, int r, const OM& x) {
        push(l += n);
        push(r += n - 1);
		for (++r; l < r; l >>= 1, r >>= 1) {
            if (l & 1) lz[l] = h(lz[l], x), l++;
            if (r & 1) --r, lz[r] = h(lz[r], x);
		}
    }

    // k: 0-indexed
    OM query(int k) {
        push(k += n);
        return lz[k];
    }
};

// Range Add Query (RAQ)
template <class OM> struct RAQ : DST<OM> {
    RAQ(int n, OM e0 = 0) : DST<OM>(n, e0) {}
    OM h(OM a, OM b) override { return a + b; }
};

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, q;
    cin >> n >> q;
    RAQ<int> raq(n);
    REP (i, q) {
        int c;
        cin >> c;
        if (c == 0) {
            int s, t, x;
            cin >> s >> t >> x;
            s--; t--;
            raq.update(s, t + 1, x);
        } else {
            int j;
            cin >> j;
            j--;
            cout << raq.query(j) << endl;
        }
    }
}