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 <iostream>
#include <vector>
#include <cmath>
#include <limits>
#define REP(i,n) for (int i = 0; (i) < (n); ++(i))
using namespace std;

template <class T> struct StarrySkyTreeMin {

    int N;
    vector<T> node_acc, node_min;
    const T INF = numeric_limits<T>::max() / 2;
  
    StarrySkyTreeMin (int n) {
        N = 2 << (int)log2(n);
        node_acc.resize(N*2,0);
        node_min.resize(N*2,0); 
    }

    void add(int l, int r, T val) {
        _add(l,r,val,0,0,N);
    }
    
    T get_min(int l, int r) {
        return _get_min(l,r,0,0,N);
    }

    void _add(int a, int b, T x, int k, int l, int r) {
        if (r <= a || b <= l) return;
        if (a <= l && r <= b) {
            node_acc[k] += x;
        } else {
            _add(a,b,x,k*2+1,l,(l+r)/2);
            _add(a,b,x,k*2+2,(l+r)/2,r);
            T l_val = node_min[k*2+1] + node_acc[k*2+1];
            T r_val = node_min[k*2+2] + node_acc[k*2+2];
            node_min[k] = min(l_val,r_val);
        }
    }

    T _get_min(int a, int b, int k, int l, int r) {
        if (r <= a || b <= l) return INF;
        if (a <= l && r <= b) return node_min[k] + node_acc[k];
        T l_val = _get_min(a,b,k*2+1,l,(l+r)/2);
        T r_val = _get_min(a,b,k*2+2,(l+r)/2,r);
        return min(l_val,r_val) + node_acc[k];
    }

};

int main() {

    StarrySkyTreeMin<int> inst(100010);

    int n,q; cin >> n >> q;
    REP(i,q) {
        int com; cin >>com;
        if(com == 0) {
            int s,t,x;
            cin >> s >> t >> x;
            inst.add(s,t+1,x);
        } else {
            int a; cin >> a;
            cout << inst.get_min(a,a+1) << endl;
        }
    }

    return 0;
}