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;

template <typename T>
class StarrySkyTree {
private:
  int n;
  T init;
  vector<T> seg, __add;

  int size (int N) {
    int ret;
    for (ret = 1; ret < N; ret <<= 1);
    return ret;
  }

  T query(int a, int b, int k, int l, int r) {
    if (r <= a or b <= l) return int(1e9); ///
    if (a <= l and r <= b) return seg[k] + __add[k];

    T vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
    T vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
    return (min(vl, vr) + __add[k]); ///
  }

  void _add(int a, int b, int x, int k, int l, int r) {
    if (r <= a || b <= l) return; // ???????????????????????§????????°??????
    if (a <= l && r <= b) { // ?????¨?????????????????¨??????????????????????????°x?????????????????????
        __add[k] += x;
        return;
    }

    _add(a, b, x, k * 2 + 1, l, (l + r) / 2);
    _add(a, b, x, k * 2 + 2, (l + r) / 2, r);

    seg[k] = min(seg[k * 2 + 1] + __add[k * 2 + 1], seg[k * 2 + 2] + __add[k * 2 + 2]); ///
  }

public:
  ///
  StarrySkyTree (int N) : n(size(N)), seg(size(N) * 2, 0), __add(size(N) * 2, 0), init(0) {}

  // [l, r) ???????????§???????????¨?????¨???!!! ... [l, r]??????find(l, r + 1)
  T find(int l, int r) {
    return query(l, r, 0, 0, n);
  }

  // [a, b) ??? x ?????????????????????
  void add(int a, int b, int x) {
      _add(a, b, x, 0, 0, n);
  }
};

int main() {
    int n, q, a, s, t, x;
    cin >> n >> q;

    StarrySkyTree<int> sst(n);

    for (int i = 0; i < q; ++i) {
        cin >> a;
        if (a == 0) {
            cin >> s >> t >> x;
            s--, t--;
            sst.add(s, t + 1, x);
        }
        else {
            cin >> x;
            x--;
            cout << sst.find(x, x + 1) << endl;
        }
    }

    return 0;
}