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
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(ll)n;i++)


// Lazy Segment Tree (for RAQ)

template <typename T>
struct RAQ{
    int n = 1;
    vector<T> raq,lazy;     // 0 indexed

    RAQ(vector<T> v){
        int sz = v.size();
        while(n<sz) n*=2;
        raq.resize(2*n+10); lazy.resize(2*n+10);

        for(int i=0;i<sz;i++) raq[i+n-1] = v[i];
        for(int i=n-2;i>=0;i--) raq[i] = raq[i*2+1] + raq[i*2+2];
    }

    void add(int a, int b, T x, int i, int l, int r){
        if(a<=l && r<=b){
            lazy[i] += x;
        }else if(l<b && a<r){
            raq[i] += (min(b,r) - max(a,l)) * x;
            add(a,b,x,i*2+1,l,(l+r)/2);
            add(a,b,x,i*2+2,(l+r)/2,r);
        }
    }

    T getSum(int a, int b, int i, int l, int r){
        if(b<=l || r<=a) return 0;
        else if(a<=l && r<=b) return (r-l)*lazy[i] + raq[i];
        else{
            T res = (min(b,r) - max(a,l)) * lazy[i];
            res += getSum(a,b,i*2+1,l,(l+r)/2);
            res += getSum(a,b,i*2+2,(l+r)/2,r);
            return res;
        }
    }
};


int main(){
    int n,q; cin >> n >> q;
    vector<int> v(n);

    RAQ<int> raq(v);
    rep(i,q){
        int x; cin >> x;
        if(x){
            int j; cin >> j;
            j--;
            cout << raq.getSum(j,j+1,0,0,n) << endl;
        }else{
            int a,b,x; cin >> a >> b >> x;
            a--;b--;
            raq.add(a,b+1,x,0,0,n);
        }
    }
}
