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 <vector>
const int MAX = 2147483647;
int min(int a, int b) {
	return a < b ? a : b;
}
int getSegTreeSize(int len) {
	if (len == 0)
		return 0;
	int ret, cnt = 0, memo = 1;
	while (memo < len) {
		memo *= 2;
		cnt++;
	}
	ret = 1 << (cnt + 1);
	return ret;
}
class RAQ {
private:
	int size, length;
	std::vector<int> node;
	RAQ() {}
	int find(int return_index, int index, int left, int right) {
		if (index == size + return_index - 1)
			return node[index];
		if ((left + right) / 2 < return_index)
			return find(return_index, index * 2 + 1, (left + right) / 2 + 1, right) + node[index];
		return find(return_index, index * 2, left, (left + right) / 2) + node[index];
	}
	void update(int left, int right, int element, int index, int i_left, int i_right) {
		if (left <= i_left && i_right <= right) {
			node[index] += element;
			return;
		}
		int middle = (i_left + i_right) / 2;
		if (middle >= left)
			update(left, right, element, index * 2, i_left, middle);
		if (middle < right)
			update(left, right, element, index * 2 + 1, middle + 1, i_right);
	}

public:
	RAQ(int size) {
		this->size = getSegTreeSize(size) / 2;
		this->length = getSegTreeSize(size);
		node.resize(this->length);
		fill(node.begin(), node.end(), 0);
	}
	void update(int left, int right, int element) {
		update(left, right, element, 1, 1, size);
	}
	int find(int index) {
		return find(index, 1, 1, size);
	}
};
int main() {
	int n, q;
	std::cin >> n >> q;
	RAQ segTree(n);
	for (int i = 0; i < q; i++) {
		int com;
		std::cin >> com;
		if (com == 0) {
			int l, r, e;
			std::cin >> l >> r >> e;
			segTree.update(l, r, e);
		}
		else {
			int index;
			std::cin >> index;
			std::cout << segTree.find(index) << std::endl;
		}
	}
}