#include <bits/stdc++.h>
#include <algorithm>
#include <unordered_map>
#define ull unsigned long long
#define int long long
#define ll long long
#define fr(i, n) for (int i = 0; i < n; i++)
#define frf(i, j, n) for (int i = j; i <= n; i++)
#define frd(i, n) for (int i = n; i >= 0; i--)
#define mp(i, j) make_pair(i, j)
#define pb(x) push_back(x)
#define INF 1e18
#define int64_t 64
using namespace std;
typedef pair<int, int> pi;
const int MAX = 1e6 + 1;
// typedef vector<vector<ll>> matrix;
const ll PRIME = 1e9 + 7;
// typedef pair<int, pair<int, int>> ppi;
// const ll MAX = 1e6 + 1;
int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
const int mod = 998244353;

int mul (int a,int b)
{
    return ( ((a%mod) * (b%mod )) % mod);
}
int add(int a,int b)
{
    return ((a % mod ) + (b % mod) % mod) ;
}
void solve()
{
 int n;
 cin>>n;
 int a,b;
 int sum=0;

 fr(i,n)
 {
     cin>>a>>b;
    a--;
    int temp1= (b*(b+1))/2;
    int temp2= (a*(a+1))/2;
    sum+=(temp1-temp2);
 }
 cout<<sum;
  
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int t;
    t = 1;
    // cin >> t;

    // int k=1;
    while (t--)
    {
        // cout << "Case " << k++ << ":\n";
        solve();
    }
}
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
ll t, n;
int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >> t >> n;
    ll x = (n * 100) / t;
    if ((n * 100) % t) ++x;
    cout << x + n - 1;
    return 0;
}