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
import sys
input = sys.stdin.readline
class Tree:
    def __init__(self, n):
        self.size = 2**((n-1).bit_length())
        self.a = [0]*(self.size*2)
        
    def find(self, c,l,r,i):
        if l == r:
            return self.a[c]
        mid = (l+r)//2
        if i <= mid:
            return self.a[c] + self.find(c*2,l,mid,i)
        else:
            return self.a[c] + self.find(c*2+1,mid+1,r,i)
    
    #この関数の考え方は勉強になる
    def add(self,c,l,r,s,t,x):
        if l == r or(l == s and t == r):
            self.a[c] += x
            return
        mid = (l+r)//2
        if t <= mid:
            self.add(c*2,l,mid,s,t,x)
        elif s > mid:
            self.add(c*2+1,mid+1,r,s,t,x)
        else:
            self.add(c*2,l,mid,s,mid,x)
            self.add(c*2+1,mid+1,r,mid+1,t,x)

n, q = map(int, input().split())
st = Tree(n)
for _ in range(q):
    cmt, *b = map(int, input().split())
    if cmt == 0:
        st.add(1,1,st.size,b[0],b[1],b[2])
    else:
        print(st.find(1,1,st.size,b[0]))
