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 <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
struct RAQ {
  int n,k;
  vector<int> data;
  vector<int> delay; // 遅延
  RAQ(int n): n(n) {
    k = sqrt(n) + 1;
    data.resize(k * k, 0);
    delay.resize(k, 0);
  }

  // [s,t)
  void add(int s, int t, int x) {
    for(int i = 0; i < k; i++) {
      int l = i * k, r = (i + 1) * k;
      if(r <= s || t <= l) continue;
      // 全て含まれる
      if(s <= l && r <= t) {
        delay[i] += x;
      } else {
        for(int j = l; j < r; j++) {
          data[j] += delay[i];
        }
        delay[i] = 0;
        for(int j = max(s, l); j < min(t, r); j++) {
          data[j] += x;
        }
      }
    }
  }

  int get(int i) {
    int j = i / k;
    return data[i] + delay[j];
  }
  
};

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  RAQ raq(n);
  FOR(i,0,q) {
    int f; cin >> f;
    if(f) {
      int i; cin >> i;
      cout << raq.get(i) << endl;
    } else {
      int s,t,x;
      cin >> s >> t >> x;
      raq.add(s, t + 1, x);
    }
  }
  
}
