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>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
using namespace std;
//using ll = long long;
#define ll long long
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e9;
const ll MOD = 1e9 + 7;


//N:1e5
const int bucket_size = 512;
struct RAQ {
    // data num, bucket num
    int N, K;
    vector<ll> data;
    vector<ll> bucket_add;

    RAQ(int n) : N(n) {
        K = (N + bucket_size - 1) / bucket_size;
        data.assign(K * bucket_size, 0);
        bucket_add.assign(K, 0);
    }

    //[l, r)
    void add(int s, int t, ll x){
        for(int i=0; i<K; i++){
            int left = i * bucket_size;
            int right = (i + 1) * bucket_size;
            if(t <= left || right <= s) continue;
            if(s <= left && right <= t) bucket_add[i] += x;
            else{
                for(int j=max(s, left); j<min(right, t); j++) data[j] += x;
            }
        }
    }

    //get one of data point
    ll get(int i){
        int k = i / bucket_size;
        return (data[i] + bucket_add[k]);
    }
};

int main(){
    int n, q;
    cin >> n >> q;
    RAQ raq(n);
    rep(i, q){
        bool flag;
        cin >> flag;
        if(flag){
            int pos; cin >> pos;
            cout << raq.get(pos) << endl;
        }
        else{
            int s, t, x;
            cin >> s >> t >> x;
            raq.add(s, t+1, x);
        }
    }
}

