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
//Range Add Query
//reference https://kujira16.hateblo.jp/entry/2016/12/15/000000
//https://onlinejudge.u-aizu.ac.jp/courses/library/3/DSL/2/DSL_2_E
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

#define rep(i,n) for(int i=0;i<(n);i++)

template <typename T>
struct RAQ {
  T n;
  T k;//バケットの数
  T sqrt_n;//バケットの大きさ
  vector<T> data;
  vector<T> bucket_sum;

  RAQ() = delete;
  RAQ(T n_,T sqrt_n_ = 1000) {
    initialize(n_,sqrt_n_);
  }

  void initialize(T n_,T sqrt_n_ = 1000) {
    n = n_;

    sqrt_n = sqrt_n_;

    k = (n + sqrt_n - 1) / sqrt_n;//切り上げ割り算

    data.clear();bucket_sum.clear();

    data.resize(k * sqrt_n,0);
    bucket_sum.resize(k,0);
  }

  void add(T a,T b,T x) { //[a,b)(0-indexed)にx を加算
    if (a >= sqrt_n * k || b > sqrt_n * k) {
      cerr << "error index k" << endl;
      return;
    }
    if (a >= n || b > n) {
      cerr << "warning index k" << endl;
    }

    rep (i,k) {
      T l = i * sqrt_n,r = (i + 1) * sqrt_n;
      if (b <= l|| r <= a) continue;
      if (l < a || b < r) {
        for (int i = max(l,a);i < min(b,r);i++) {
          data[i] += x;
        }
      } else {
        bucket_sum[i] += x;
      }
    }
  }

  T get(T i) { // i番目(0-indexed)の値を取得する
    return data[i] + bucket_sum[i / sqrt_n];
  }
};

using ll = long long;

signed main() {
  ll n,q;
  cin >> n >> q;

  RAQ<ll> raq(n);

  rep(i,q) {
    ll c;
    cin >> c;
    if(c) {
      ll i;
      cin >> i;
      i--;
      cout << raq.get(i) << endl;
    } else {
      ll s,t,x;
      cin >> s >> t >> x;
      s--;t--;
      raq.add(s,t+1,x);
    }
  }
  return 0;
}

