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

int main () {
    int n; cin >> n;

    int res = 0;

    vector<int> d[33];
    vector<bool> s(33,false);
    for (int i = 0; i < n; i++) {
        int x, y; cin >> x >> y;
        d[x].push_back(y);
        for (int  j = x; j <= y; j++) s[j] = true;
    }

    for (int i = 1; i < 32; i++) {
        if (d[i].size() > 0) {
            res += 100;
            sort(d[i].begin(), d[i].end());
            for (int j = 1; j < d[i].size(); j++) {
                if (d[i][j] > i) {
                    d[i+1].push_back(d[i][j]);
                }
            }
        } else if (s[i] > 0) res += 50;
    }

    cout << res << endl;

    return 0;
}