#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> ii;

int main() {
    int t, n;
    scanf("%d %d", &t, &n);

    ll l = 0, r = 1e14, ans;
    while (l <= r) {
        ll mid = (l+r)/2, nex = (100*mid + t*mid) / 100;

        if (nex-mid < n)
            ans = nex+1, l = mid+1;
        else
            r = mid-1;
    }

    printf("%lld\n", ans);
    return 0;
}

#include <bits/stdc++.h>
//#include <atcoder/all>

#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)

#define all(x) x.begin(), x.end()

using namespace std;
//using namespace atcoder;

using ll = long long;
using P = pair<ll, ll>;

int main() {
  int n, m;
  cin >> n >> m;
  vector<P> xy(m);
  rep(i, m) {
    ll x, y;
    cin >> x >> y;
    xy.at(i) = make_pair(x, y);
  }
  sort(xy.begin(), xy.end());
  vector<set<ll>> xxyy;
  ll curX = -1;
  int curI = -1;
  rep(i, m) {
    ll x = xy.at(i).first;
    ll y = xy.at(i).second;
    if (curX == x) {
      xxyy.at(curI).insert(y);
    } else {
      curI++;
      xxyy.emplace_back();
      xxyy.at(curI).insert(y);
      curX = x;
    }
  }
  set<ll> res;
  res.insert(n);
  vector<ll> dj = {1, -1};
  for (auto &s : xxyy) {
//    cerr << "s: " << endl;
//    for (auto v : s) {
//      cerr << v << ", ";
//    }
//    cerr << endl;

    vector<ll> insertV;
    vector<ll> eraseV;
    for (auto &ss : s) {
      if (res.count(ss) != 0) {
        eraseV.push_back(ss);
      }
      rep(j, dj.size()) {
        ll nj = ss + dj[j];
        if (nj >= 0 && nj <= n * 2) {
          if (res.count(nj) != 0) {
            insertV.push_back(ss);
          }
        }
      }
    }
    for (auto &x : eraseV) {
      res.erase(x);
    }
    for (auto &x : insertV) {
      res.insert(x);
    }
//    cerr << "res: " << endl;
//    for (auto v : res) {
//      cerr << v << ", ";
//    }
//    cerr << endl;
  }
  cout << res.size() << endl;
  return 0;
}
