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 unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

template < typename T >
void vprint(T &v){
	REP(i, v.size()){
		cout << v[i] << " ";
	}
	cout << endl;
}

const ll N_MAX = 202020;

struct RAQSB{
	ll N;
	ll sN;
	ll data[N_MAX];
	ll bucket[N_MAX];

	RAQSB(ll n){
		sN = (ll)sqrt(n) + 1;
		N = sN * sN;
		REP(i, N_MAX){
			data[i] = 0;
			bucket[i] = 0;
		}
	}

	void add(ll s, ll t, ll x){
		ll ss = s/sN;
		ll tt = t/sN;
		if(ss==tt){
			for(int i=s;i<t;i++){
				data[i] += x;
			}
		}else{
			for(int i=s;i<(ss+1)*sN;i++){
				data[i] += x;
			}
			for(int i=tt*sN;i<t;i++){
				data[i] += x;
			}
			for(int i=ss+1;i<tt;i++){
				bucket[i] += x;
			}
		}
	}

	ll get_val(ll i){
		return data[i] + bucket[i/sN];
	}
};

int main(){
	ll n, q;
	cin >> n >> q;
	RAQSB raqsb(n);
	REP(i, q){
		ll a, b, c, d;
		cin >> a;
		if(a==0){
			cin >> b >> c >> d;
			b--;c--;
			raqsb.add(b, c+1, d);
		}else{
			cin >> b;
			b--;
			cout << raqsb.get_val(b) << endl;
		}
	}
    return 0;
}