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 FOR(I,X,Y) for(long long (I)=(X);(I)<(Y);(I)++)
#define REP(I,X,Y) for(long long (I)=(Y)-1;(I)>=(X);(I)--)
#define ALL(X) (X).begin(),(X).end()
#define pb push_back
#define COUNT(V,X) upper_bound((V).begin(),(V).end(),X)-lower_bound((V).begin(),(V).end(),X)
#define debug(x) cerr<<#x<<':'<<x<<endl;
#define DEBUG(v) cerr<<#v<<':';for(auto x:v)cerr<<x<<' ';cerr<<endl;
#define INF 1000000007
#define LINF 1000000000000000007
#define EPS 1e-9
typedef long long ll;

struct RangeAddQuery{
  vector<long long> data;
  long long sq;
  vector<long long> lazy;
  void boot(long long n){
    for(long long i = 0;i < n;i++)data.push_back(0);
    sq = round(sqrt((double)n));
    lazy.resize(n/sq+1);
    for(long long i = 0;i < lazy.size();i++)lazy[i] = 0;
  }
  void add(long long s,long long t,long long num){
    if(lazy[s/sq] != 0){
      for(long long i = s/sq*sq;i < min((s/sq+1)*sq,(long long)data.size());i++)data[i] += lazy[s/sq];
      lazy[s/sq] = 0;
    }
    if(lazy[t/sq] != 0){
      for(long long i = t/sq*sq;i < min((t/sq+1)*sq,(long long)data.size());i++)data[i] += lazy[t/sq];
      lazy[t/sq] = 0;
    }
    while(s%sq && s<=t){
      data[s] += num;
      s++;
    }
    while((t-s)/sq){
      lazy[s/sq] += num;
      s += sq;
    }
    while(s <= t){
      data[s] += num;
      s++;
    }
    return;
  }
  long long get(long long s){
    if(lazy[s/sq] != 0){
      for(long long i = s/sq*sq;i < min((s/sq+1)*sq,(long long)data.size());i++)data[i] += lazy[s/sq];
      lazy[s/sq] = 0;
    }
    return data[s];
  }
};

signed main(){
  RangeAddQuery RAQ;
  int n,q;
  cin >> n >> q;
  int query,s,t,x;
  RAQ.boot(n);
  vector<long long> ans;
  FOR(i,0,q){
    cin >> query;
    if(query == 0){
      cin >> s >> t >> x;
      RAQ.add(s,t,x);
    }
    else{
      cin >> s;
      ans.pb(RAQ.get(s));
    }
  }
  for(auto x:ans)cout << x << endl;
}