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 int long long
using namespace std;
int N=1;

int bit0[1000000],bit1[1000000];
int sum(int *b,int i){
  int res=0;
  while(i){
    res+=b[i];
    i-=i&-i;
  }
  return res;
}
void add(int *b,int i,int v){
  while(i<=N){
    b[i]+=v;
    i+=i&-i;
  }
}

signed main(){
  int n,q;cin>>n>>q;
  while(n>N)N*=2;
  memset(bit0,0,sizeof(bit0));
  memset(bit1,0,sizeof(bit1));
  std::vector<int> ans;
  for(int i=0;i<q;i++){
    int a;cin>>a;
    if(a){
      int s;cin>>s;
      int res=0;
      res+=sum(bit0,s)+sum(bit1,s)*s;
      res-=sum(bit0,s-1)+sum(bit1,s-1)*(s-1);
      ans.push_back(res);
    }
    else{
      int l,r,x;cin>>l>>r>>x;
      add(bit0,l,-x*(l-1));
      add(bit1,l,x);
      add(bit0,r+1,x*r);
      add(bit1,r+1,-x);
    }
  }
  for(int p:ans)cout<<p<<endl;
}

