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:
#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <list>

long long int INF = 2147483647;
long long int MOD = 1000000007;
using namespace std;

typedef pair<long long int, long long int> P;

#define MAX_N 200000

using namespace std;

int const TREE_SIZE = 1 << 20;
long long int seg_tree[TREE_SIZE];

void change(int a, long long int w){
	
	// a番目の要素をwに変更する O(log N)
	
	a += TREE_SIZE / 2;
	
	seg_tree[a] += w;
	
	for(int x = a / 2; x > 0; x /= 2){
		seg_tree[x] = seg_tree[2 * x] + seg_tree[2 * x + 1];
	}
}

long long int query(int a, int b, int index, int l, int r){
	
	// 区間 [a, b) の要素の最小値を返す O(log N)
	// 外からは query(a, b, 1, 0, TREE_SIZE / 2) のように呼ぶ
	
	if(r <= a || b <= l){
		return 0;
	}
	if(a <= l && r <= b){
		return seg_tree[index];
	}
	
	return query(a, b, index * 2, l, (l + r) / 2) + query(a, b, index * 2 + 1, (l + r) / 2, r);
}

int main(){
	
	int n, q;
	cin >> n >> q;
	
	for(int i = 0; i < TREE_SIZE; i++){
		seg_tree[i] = 0;
	}
	
	for(int i = 0; i < q; i++){
		long long int num, a, b, c;
		cin >> num;
		if(num == 0){
			cin >> a >> b >> c;
			change(a, c);
			change(b + 1, -c);
		}else{
			cin >> a;
			cout << query(0, a + 1, 1, 0, TREE_SIZE / 2) << endl;
		}
		/*
		for(int j = 0; j <= n; j++){
			cout << query(0, j + 1, 1, 0, TREE_SIZE / 2) << " ";
		}
		cout << endl;
		*/
	}
	
	return 0;
}