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 <iomanip>
#include <string>
#include <vector>
#include <array>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <map>
#include <set>

#define INF_LL 9000000000000000000
#define INF 2000000000

#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

class RangeSeg{
	int n;
	vector<ll> data, datb;
public:
	RangeSeg(int n_){
		n = 1;
		while(n < n_) n <<= 1;

		REP(i, 2*n-1){
			data.push_back(0);
			datb.push_back(0);
		}
	}

	void add(int s, int t, int l, int r, int k, int x){
		if(s <= l && r <= t){
			data[k] += x;
		}else if(l < t && s < r){
			datb[k] += (min(r, t)-max(l, s))*x;
			add(s, t, (l+r)/2, r, k*2+2, x);
			add(s, t, l, (l+r)/2, k*2+1, x);
		}
	}

	void add(int s, int t, int x){
		add(s, t, 0, n, 0, x);
	}

	int sum(int s, int t, int l, int r, int k){
		if(t <= l || r <= s) return 0;
		if(s <= l && r <= t){
			return (min(r, t)-max(l, s))*data[k]+datb[k];
		}else{
			ll res = 0;
			res += (min(r,t)-max(l,s))*data[k];
			res += sum(s, t, l, (l+r)/2, k*2+1);
			res += sum(s, t, (l+r)/2, r, k*2+2);
			return res;
		}
	}

	int sum(int s, int t){
		return sum(s, t, 0, n, 0);
	}
};

int main(void){
	int n, q;
	cin >> n >> q;
	RangeSeg rs(n);
	REP(i, q){
		int com;
		cin >> com;
		if(com == 0){
			int s, t, x;
			cin >> s >> t >> x; s--; t--;
			rs.add(s, t+1, x);
		}else{
			int x;
			cin >> x; x--;
			cout << rs.sum(x, x+1) << endl;
		}
	}
}