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;
#define rep(i,n) for(int i=0;i<(n);i++)

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

#define MAX 500005

template<typename T>
struct BIT {
  int n;
  vector<T> bit[2];
  BIT(int _n) : n(_n+1) {
    rep(i,2) bit[i].assign(n,0);
  }
  void add_sub(int p, int i, T x) {
    while (i < n) {
      bit[p][i] += x;
      i += i&-i;
    }
  }
  void add(int l, int r, T x) {
    add_sub(0,l,-x*(l-1));
    add_sub(0,r,x*(r-1));
    add_sub(1,l,x);
    add_sub(1,r,-x);

  }
  T sum_sub(int p, int i) {
    T s(0);
    while (i > 0) {
      s += bit[p][i];
      i -= i&-i;
    }
    return s;
  }
  T sum(int i) { return sum_sub(0,i) + sum_sub(1,i)*i; }
  T query(int l, int r) { return sum(r-1) - sum(l-1); }
  T operator[](int i) { return query(i,i+1); }
};

int main(int, char**)
{
  int n, q;
  cin >> n >> q;

  BIT<int> bit(n);

  vector<int> ans;
  rep(i,q) {
    int command; cin >> command;
    if (command == 0) {
      int s, t, x;
      cin >> s >> t >> x;
      bit.add(s,t+1,x);
    } else if (command == 1) {
      int i; cin >> i;
      ans.push_back(bit[i]);
    }
  }
  for (auto a : ans) cout << a << endl;

  return 0;
}