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
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdlib>
#include <map>
#include <iomanip>
#include <set>
#include <stdio.h>
#include <ctype.h>
using namespace std;
#define pie 3.141592653589793238462643383279
#define mod 1000000007
#define int long long
#define INF (1<<31)-1
#define all(vec) vec.begin(),vec.end()
#define P pair<int,int>
#define S second
#define F first

int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
int lcm(int x, int y) {
	return x / gcd(x, y)*y;
}
bool prime(int x) {
	for (int i = 2; i <= sqrt(x); i++) {
		if (x%i == 0)return false;
	}
	return true;
}
int kai(int x, int y) {
	int res = 1;
	for (int i = x - y + 1; i <= x; i++) {
		res *= i; res %= mod;
	}
	return res;
}
int mod_pow(int x, int y, int m) {
	int res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}
int comb(int x, int y) {
	if (y > x)return 0;
	return kai(x, y) * mod_pow(kai(y, y), mod - 2, mod) % mod;
}

int n, q;
vector<int> BIT[2];
void init(int n_) {
	n = n_ + 1;
	BIT[0].resize(n, 0);
	BIT[1].resize(n, 0);
}

void add_sub(int p, int i, int x) {
	while (i < n) {
		BIT[p][i] += x;
		i += i & -i;
	}
}

void add(int l, int r, int x) {
	add_sub(0, l, -x * (l - 1));
	add_sub(0, r, x*(r - 1));
	add_sub(1, l, x);
	add_sub(1, r, -x);
}

int sum_sub(int p, int i) {
	int s = 0;
	while (0 < i) {
		s += BIT[p][i];
		i -= i & -i;
	}
	return s;
}
int sum(int i) {
	int s = sum_sub(0, i) + sum_sub(1, i)*i;
	int t = sum_sub(0, i - 1) + sum_sub(1, i - 1)*(i - 1);
	return s - t;
}

signed main() {
	cin >> n >> q;
	init(n);
	for (int i = 0; i < q; i++) {
		int a;
		cin >> a;
		if (!a) {
			int b, c, d;
			cin >> b >> c >> d;
			add(b, c + 1, d);
		}
		else {
			int b;
			cin >> b;
			cout << sum(b) << endl;
		}
	}
}
