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 <bits/stdc++.h>
using namespace std;
struct segment_tree {
  public:
    int n, ht, N;
    vector<int> dat;
    segment_tree(int sz) {
      n = sz;
      ht = 1;
      N = 1;
      while (N < n) {
        ht++;
        N <<= 1;
      }
      dat.resize(2 * N, 0);
    }
    segment_tree(vector<int> v) {
      n = v.size();
      ht = 1;
      N = 1;
      while (N < n) {
        ht++;
        N <<= 1;
      }
      dat.resize(2 * N);
      for (int i = 0; i < n; i++) {
        dat[N + i] = v[i];
      }
      for (int i = N - 1; i >= 1; i--) {
        dat[i] = dat[2 * i] + dat[2 * i + 1];
      }
    }
    void add (int i, int x) {
      i += N;
      dat[i] += x;
      i >>= 1;
      for (; i; i >>= 1) {
        dat[i] = dat[2 * i] + dat[2 * i + 1];
      }
    }
    int getSum (int l, int r, int k = 1, int L = 0, int R = -1) {
      if (R == -1) R = N;
      if (R <= l || r <= L) {
        return 0;
      } else if (l <= L && R <= r) {
        return dat[k];
      } else {
        int C = (L + R) >> 1;
        return getSum(l, r, 2 * k, L, C) + getSum(l, r, 2 * k + 1, C, R);
      }
    }
};
int main() {
  int n, q;
  cin >> n >> q;
  segment_tree sgt(n + 1);
  while (q--) {
    int c;
    cin >> c;
    if (c == 0) {
      int s, t, x;
      cin >> s >> t >> x;
      sgt.add(--s, x);
      sgt.add(t, -x);
    } else {
      int i;
      cin >> i;
      cout << sgt.getSum(0, i) << '\n';
    }
  }
  return 0;
}
