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 <boost/multiprecision/cpp_dec_float.hpp>
//#include <boost/multiprecision/cpp_ll.hpp>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <math.h>
#include <algorithm>
#include <bitset>
using namespace std;
//namespace mp = boost::multiprecision;
//using llll = mp::cpp_ll;
// 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする)
//using Real = mp::number<mp::cpp_dec_float<1024>>;
using ll = long long;
const double EPS = 1e-10;
const ll MOD = 7+(1e+9);

struct range_minimum_query{
  ll fnc(ll a,ll b){
    ll ans = a+b;
    return ans;
  }

  ll n,INF;
  vector<ll> segtree;
  range_minimum_query(ll sz,ll inf=MOD){
    INF=inf;
    for(n = 1; n<sz;) n <<= 1;
    segtree.assign(2*n-1,INF);
  }
  ll find(ll l, ll r){return find(l,r,0,n,0);}
  ll find(ll l, ll r, ll a, ll b, ll k){
    if(b<=l || r<=a) return INF;
    else if(l<=a && b<=r) return segtree[k];
    else return fnc(find(l,r,a,(a+b)/2,2*k+1), find(l,r,(a+b)/2,b,2*k+2));
  }
  void update(ll i, ll x){
    i += n-1;
    segtree[i] += x;
    while(i>0){
      i = (i-1)/2;
      segtree[i] = fnc(segtree[2*i+1], segtree[2*i+2]);
    }
  }
};

int main(){
  ll n,q;
  cin>>n>>q;
  range_minimum_query rmq(n+2,0);
  for(ll i=0;i<q;i++){
    ll a,b,c,d;
    cin>>a>>b;
    if(a==0){
      cin>>c>>d;
      rmq.update(b,d);
      rmq.update(c+1,-d);
    }
    else cout<<rmq.find(0,b+1)<<endl;
  }
}