#include <bits/stdc++.h>
 
using namespace std;
 
#define MAX_N 100
#define MAX_V 200
#define INF 1e9
 
int V,match[MAX_V];
vector<int> G[MAX_V];
bool used[MAX_V];
 
void add_edge(int u,int v){
  G[u].push_back(v);
  G[v].push_back(u);
}
 
bool dfs(int v){
  used[v] = true;
  for(int i = 0 ; i < (int)G[v].size() ; i++){
    int u = G[v][i],w = match[u];
    if(w < 0 || (!used[w] && dfs(w))){
      match[v] = u;
      match[u] = v;
      return true;
    }
  }
  return false;
}
 
int bipartite_matching(){
  int res = 0;
  memset(match,-1,sizeof(match));
  for(int v = 0 ; v < V ; v++){
    if(match[v] < 0){
      memset(used,false,sizeof(used));
      if(dfs(v)){ res++; }
    }
  }
  return res;
}
 
int main(){
    int N,a,b;
    cin >> N;
    for(int i = 0 ; i < N ; i++){
        cin >> a >> b; a--; b--;
        for(int j = a ; j <= b ; j++){
            add_edge(j,i+31);
        }
    }
    V = N + 31;
    int K = bipartite_matching();
    cout << 50*(31-K)+100*K << endl;
    return 0;
}