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 <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V  = vector<T>;
template<class T = int> using VV = V< V<T> >;
struct M {
  using T = int; using U = int;
  static void ap(T &a, const U &g) { a += g; }
  // static void ap(U &f, const U &g) { f += g; }
  static constexpr U id() { return 0; }
};
template<class M> struct ST {
  using T = typename M::T; using U = typename M::U; int n; V<T> t; V<U> u;
  ST(int n) : n(n) { t.resize(n); u.assign(n, M::id()); }
  void _ap(int i, const U &f) { if (i < n) M::ap(u[i], f); else M::ap(t[i - n], f); }
  void set(int l, int r, const U &f) {
    stack<int> s; for (int i = l + n; i >>= 1;) s.push(i); for (int i = r + n - 1; i >>= 1;) s.push(i);
    while (not s.empty()) { int i = s.top(); s.pop(); _ap(2 * i, u[i]); _ap(2 * i + 1, u[i]); u[i] = M::id(); }
    for (l += n, r += n; l < r; l >>= 1, r >>= 1) { if (l & 1) _ap(l++, f); if (r & 1) _ap(--r, f); }
  }
  T get(int i) { T res = t[i]; for (i += n; i >>= 1;) M::ap(res, u[i]); return res; }
};
int main() {
  cin.tie(NULL); ios::sync_with_stdio(false);
  int n, q; cin >> n >> q;
  ST<M> st(n); fill(st.t.begin(), st.t.end(), 0);
  for (int i = 0; i < q; i++) {
    int c; cin >> c;
    if (c) {
      int j; cin >> j, j--;
      cout << st.get(j) << '\n';
    } else {
      int l, r, x; cin >> l >> r >> x, l--, r--;
      st.set(l, r + 1, x);
    }
  }
}