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 <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
#define INF 0x7FFFFFFF

int main(){
  long long n,q,xx,nn;
  scanf ("%lld %lld",&n,&q);
  xx=int(sqrt(n))+1;
  nn=xx*xx;
  vector<long long> a(nn,0);
  vector<long long> aa(xx,0);
  long long int x,y,c,xxx,yyy,z;
  for(int i=0;i<q;i++){
    scanf ("%lld",&c);
    scanf ("%lld",&x);
    x--;
    xxx=x/xx;
    if(c==1){
      long long ans;
      ans=a[x]+aa[xxx];
      printf("%lld\n",ans);
    }
    else{
      scanf ("%lld %lld",&y,&z);
      y--;
      yyy=y/xx;
      long long ma,mb;
      ma=xxx*xx+xx;
      mb=yyy*xx;
      if((y-x)>=xx*2){
        for(int t=x;t<ma;t++){
          a[t]=a[t]+z;
        }
        for(int t=xxx+1;t<yyy;t++){
          aa[t]=aa[t]+z;
        }
        for(int t=mb;t<=y;t++){
          a[t]=a[t]+z;
        }
      }
      else{
        for(int t=x;t<=y;t++){
          a[t]=a[t]+z;
        }
      }


    }
    /*for(int s=0;s<nn;s++){
      printf("%d",a[s]);
    }
    printf("\n");*/
  }
}