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;
using ll = long long;

struct RMQ {
	using type = int;
	static type id() { return INT_MAX; }
	static type op(const type& l, const type & r) { return min(l, r); }
};

template <typename M>
class node {
	using T = typename M::type;
public:
	T val, add;
	node<M> *l, *r;
	node() : val(), add(), l(nullptr), r(nullptr) {}
};

template <typename M>
class StarrySkyTree {
	using T = typename M::type;
	const ll n;
	node<M> *root;
	ll size(ll n) {
		ll res = 1;
		while (res < n) res <<= 1ll;
		return res;
	}
	T sub(ll l, ll r, node<M> *n, ll lb, ll ub) {
		if (ub <= l || r <= lb) return M::id();
		if (!n) return T();
		if (l <= lb && ub <= r) return n->val + n->add;
		return M::op(sub(l, r, n->l, lb, (lb + ub) / 2), sub(l, r, n->r, (lb + ub) / 2, ub)) + n->add;
	}
	node<M>* suc(ll l, ll r, node<M> *n, ll lb, ll ub, T val) {
		if (ub <= l || r <= lb) return n;
		if (!n) n = new node<M>;
		if (l <= lb && ub <= r) {
			n->add += val;
			return n;
		}
		n->l = suc(l, r, n->l, lb, (lb + ub) / 2, val);
		n->r = suc(l, r, n->r, (lb + ub) / 2, ub, val);
		n->val = M::op(n->l ? n->l->val + n->l->add : T(), n->r ? n->r->val + n->r->add : T());
		return n;
	}
public:
	StarrySkyTree(ll n_) : n(size(n_)), root(nullptr) {}
	void add(ll l, ll r, T val) {
		root = suc(l, r + 1, root, 0, n, val);
	}
	T find(ll l, ll r) {
		return sub(l, r + 1, root, 0, n);
	}
};

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int n, q, b, i, s, t, x;
	cin >> n >> q;
	StarrySkyTree<RMQ> st(n);
	while (q--) {
		cin >> b;
		if (b) {
			cin >> i; i--;
			printf("%d\n", st.find(i, i));
		}
		else {
			cin >> s >> t >> x; s--, t--;
			st.add(s, t, x);
		}
	}
	return 0;
}