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;
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define rep(i, N) for(ll i=0; i<(N); ++i)

//sqrtN -> 最大値のみに対応できればいいので，それを使う
const int sqrtN = 512;
struct SqrtDecomposition {
  int N, K;
  vector<int> data;
  vector<int> bucketData;
  const int INIT_VALUE = 0;
  
  SqrtDecomposition(int n) : N(n) {
    //分割数
    K = (N + sqrtN - 1) / sqrtN;
    data.assign(K * sqrtN, INIT_VALUE);
    bucketData.assign(K, INIT_VALUE);
  }
  //ここまで共通
  
  void change(int x, int y, int v) {
    for(int k = 0; k < K; ++k) {
      int l = k * sqrtN;
      int r = (k + 1) * sqrtN;
      if(y <= l || x >= r) continue;  //完全に区間外
      if(l >= x && y >= r) {  //完全に区間内
        bucketData[k] += v;
      } else {
        //一部区間内
        for(int i = max(x, l); i < min(y, r); ++i) {
          data[i] += v;
        }
      }
    }
  }
  
  // [x, y)
  int get(int x) {
    int k = x / sqrtN;
    
    return data[x] + bucketData[k];
  }
};

int main() {
  //range sum query
  int n, q;
  cin >> n >> q;
  
  SqrtDecomposition dec(n);
  vector<string> res;
  rep(_, q) {
    int c;
    cin >> c;
    if(c == 0) {
      int s, t, x;
      cin >> s >> t >> x;
      --s;// --t;
      dec.change(s, t, x);
    } else {
      int i;
      cin >> i;
      --i;
      cout << dec.get(i) << endl;
    }
  }
}

