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>
using namespace std;

typedef int64_t i64;

constexpr i64 llinf=4611686018427387903LL;

template <class T_>
class raddq{
public:
    i64 n;
    i64 h;
    T_ *lz;
    void make(i64 N){
        n=1;
        h=0;
        while(n<N){
            n*=2;
            h++;
        }
		lz=new i64[n*2]{};
        for(i64 i=0;i<n*2;i++) lz[i]=(T_)0;
    }
    void update(i64 A,i64 B,T_ X){
        thrust(A+=n);
        thrust(B+=n-1);
        for(i64 l=A,r=B+1;l<r;l/=2,r/=2){
            if(l%2==1){
                lz[l]+=X;
                l++;
            }
            if(r%2==1){
                r--;
                lz[r]+=X;
            }
        }
    }
    T_ query(i64 K){
        thrust(K+=n);
        return lz[K];
    }
    void thrust(i64 K){
        for(i64 i=h;i>0;i--){
            i64 k=K>>i;
            if(lz[k]==(T_)0) continue;
            lz[k*2]+=lz[k];
            lz[k*2+1]+=lz[k];
            lz[k]=(T_)0;
        }
    }
};

int main(void){
    i64 n,q;
    scanf("%lli%lli",&n,&q);
    raddq<i64> raq;
    raq.make(n);
    for(i64 i=0;i<q;i++){
        i64 c;
        scanf("%lli",&c);
        if(c==0){
            i64 s,t,x;
            scanf("%lli%lli%lli",&s,&t,&x);
            raq.update(s-1,t,x);
        }
        else{
            i64 j;
            scanf("%lli",&j);
            printf("%lli\n",raq.query(j-1));
        }
    }
    return 0;
}