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

int main() {
  int N;
  cin >> N;
  
  long long sum =0;
  for(int i=0;i<N;i++){
    long long a,b;
    cin >> a >> b;
    sum += ((a+b)*(b-a+1))/2;
  }
  cout << sum << endl;
}

#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define INF 1000000000
#define LINF 1000000000000000000
#define MOD 1000000007
#define mod 998244353
#define INF63 1061109567
#define INF127 9187201950435737471
#define UINF 18446744073709551615
#define F first
#define S second
#define ll long long
#define N 110
using namespace std;
ll n;
bool vis[N];
vector<ll> vt[N];
vector<pair<ll,ll> > nail;
double calc_dist(ll x1,ll y1,ll x2,ll y2)
{
	return sqrt((double)((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
}
bool reach(ll x,ll dest)
{
	if(x==dest)
	{
		return true;
	}
	vis[x]=true;
	ll i;
	for(i=0;i<vt[x].size();i++)
	{
		if(vis[vt[x][i]])
		{
			continue;
		}
		if(reach(vt[x][i],dest))
		{
			return true;
		}
	}
	return false;
}
bool check(double mx_d)
{
	mx_d*=2;
	double dist;
	ll i,j;
	//n is the upper edge, n+1 is the lower edge
	for(i=0;i<N;i++)
	{
		vt[i].clear();
	}
//	cout<<mx_d<<endl;
	memset(vis,false,sizeof(vis));
	for(i=0;i<n;i++)
	{
		dist=calc_dist(nail[i].F,nail[i].S,nail[i].F,100);
	//	cout<<dist<<" ";
		if(dist<mx_d)
		{
			vt[i].push_back(n);
			vt[n].push_back(i);
		}
		dist=calc_dist(nail[i].F,nail[i].S,nail[i].F,-100);
	//	cout<<dist<<endl;
		if(dist<mx_d)
		{
			vt[i].push_back(n+1);
			vt[n+1].push_back(i);
		}
		for(j=i+1;j<n;j++)
		{
			dist=calc_dist(nail[i].F,nail[i].S,nail[j].F,nail[j].S);
			if(dist<mx_d)
			{
				vt[i].push_back(j);
				vt[j].push_back(i);
			}
	//		cout<<i<<","<<j<<": "<<dist<<endl;
		}
	}
//	puts("");
	if(reach(n,n+1))
	{
		return false;
	}
	return true;
}
int main(){
	ll i,x,y;
	double l,r,mid;
	scanf("%lld",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lld%lld",&x,&y);
		nail.push_back(make_pair(x,y));
	}
	l=0;
	r=100;
	while(l+0.0000000001<r)
	{
		mid=(l+r)/2;
		if(check(mid))
		{
			l=mid;
		}
		else
		{
			r=mid;
		}
	}
	printf("%.16f",l);
	return 0;
}