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>
using namespace std;
#define int long long
const int MAX=1<<18;
int n,dat[2*MAX-1],laz[2*MAX-1];
void init(int n_){
  n=1;
  while(n<n_) n*=2;
  for(int i=0;i<2*n-1;i++) dat[i]=laz[i]=0;
}
inline void eval(int len,int k){
  if(k*2+1<n*2-1){
    laz[k*2+1]+=laz[k];
    laz[k*2+2]+=laz[k];
  }
  dat[k]+=laz[k]*len;
  laz[k]=0;
}
int update(int a,int b,int x,int k=0,int l=0,int r=n){
  eval(r-l,k);
  if(r<=a||b<=l) return dat[k]+laz[k]*(r-l);
  if(a<=l&&r<=b) return dat[k]+(laz[k]+=x)*(r-l);
  eval(r-l,k);
  return dat[k]=update(a,b,x,k*2+1,l,(l+r)/2)+update(a,b,x,k*2+2,(l+r)/2,r);
}
int query(int a,int b,int k=0,int l=0,int r=n){
  eval(r-l,k);
  if(r<=a||b<=l) return 0;
  if(a<=l&&r<=b) return dat[k];
  int vl=query(a,b,k*2+1,l,(l+r)/2);
  int vr=query(a,b,k*2+2,(l+r)/2,r);
  return vl+vr;
}
signed main(){
  int N,q;
  cin>>N>>q;
  init(N);
  for(int i=0;i<q;i++){
    int f;
    cin>>f;
    if(f){
      int x;
      cin>>x;
      cout<<query(x-1,x)<<endl;
    }else{
      int s,t,x;
      cin>>s>>t>>x;
      update(s-1,t,x);
    }
  }
}