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;

template <class T = long long>
struct BIT_Range_Add_Point_Get {
	// 区間更新・点取得
	//階差数列のBITを作って端から足す方針 vec[i] = data[i-1]-data[i-2];
	vector<T> vec;
	int n;
	BIT_Range_Add_Point_Get(int sz) : vec(sz + 1, 0), n(sz) {}
	//元の値に足す 更新は不可
	void add(int lef, int rig, T val, int index = 0) {
		if(!index) {
			lef++;
			rig++;
		}
		for(int x = lef; x <= n; x += x & -x) vec[x] += val;
		for(int x = rig; x <= n; x += x & -x) vec[x] -= val;
	}
	//端からの合計値 = 値計算
	T get(int a, int index = 0) {
		a += 1 - index;
		T ret = 0;
		for(int x = a; x > 0; x -= x & -x) ret += vec[x];
		return ret;
	}
};

int main() {
	int n, q;
	cin >> n >> q;
	BIT_Range_Add_Point_Get<int> b(n);
	for(int i = 0; i < q; i++) {
		int com;
		cin >> com;
		if(com) {
			int idx;
			cin >> idx;
			cout << b.get(idx - 1) << endl;
		} else {
			int s, t, x;
			cin >> s >> t >> x;
			b.add(s - 1, t, x);
		}
	}
}