#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
const int N=10005;
typedef long long ll;
struct arr{
	int y,nex;
}g[N*3];
int m,n,pos[N],sz,nn,ans;
long long p,sum[N],h[N],a[N];
int b[N];
void init(int x,int y)
{
	g[++sz].y=y;
	g[sz].nex=pos[x];
	pos[x]=sz;
}
void dfs(int fat,int x,int y)
{//cout<<y;
	for(int i=pos[x];i;i=g[i].nex){
		int yy=g[i].y;
		if(yy!=fat){
			dfs(x,yy,y+1);
		}
	}
	h[y]++;
	nn=max(y,nn);
}
int main()
{
	int x,y;
	cin>>n>>m>>p;
	for(int i=1;i<n;i++){
		scanf("%d%d",&x,&y);
		init(x,y);
		init(y,x);
	}
	dfs(1,1,0);
	//cout<<1;
//	for(int i=1;i<=nn;i++)cout<<h[i]<<endl;
/*	ll s=0;*/
	for(int i=1;i<=nn;i++){
		//sum[i]=sum[i-1]+s;
		b[i]+=b[i-1]+h[i];
	//	s+=h[i];
	//	a[i]=s;
	}
	//cout<<nn<<endl;
	h[0]=0;
	int s=0,l=1,cs=0;
	int res;
	for(int i=1;i<=nn;i++){
		if(cs>p){
			while(cs>p){
				cs-=h[l]*(i-l);
				s-=h[l];l++;
			}
		}
		res=min((p-cs)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
	//	cout<<pp<<endl;
		if(pp>ans)ans=min(m,pp);
		s+=h[i];
		cs+=s;
	}
	/*for(ll i=1;i<=nn;i++){
		long long l=1,r=i+1,t,res;
		while(l!=r){
			long long mid=(l+r)/2;
			t=sum[i]-sum[mid]-ll(i-mid)*a[mid-1];
			if(t<=p)r=mid;
			else l=mid+1;
			//cout<<l<<" "<<r<<endl;
		}
		//cout<<i<<" "<<l<<endl;
		t=sum[i]-sum[l]-(i-l)*a[l-1];
		res=min((p-t)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
		if(pp>ans)ans=min(pp,m);
	}*/
	cout<<ans<<endl;

   // system("pause");
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
const int N=10005;
typedef long long ll;
struct arr{
	int y,nex;
}g[N*3];
int m,n,pos[N],a[N],sz,nn,ans;
long long p,sum[N],h[N],b[N];
void init(int x,int y)
{
	g[++sz].y=y;
	g[sz].nex=pos[x];
	pos[x]=sz;
}
void dfs(int fat,int x,int y)
{//cout<<y;
	for(int i=pos[x];i;i=g[i].nex){
		int yy=g[i].y;
		if(yy!=fat){
			dfs(x,yy,y+1);
		}
	}
	h[y]++;
	nn=max(y,nn);
}
int main()
{
	int x,y;
	cin>>n>>m>>p;
	for(int i=1;i<n;i++){
		scanf("%d%d",&x,&y);
		init(x,y);
		init(y,x);
	}
	dfs(1,1,0);
	//cout<<1;
//	for(int i=1;i<=nn;i++)cout<<h[i]<<endl;
	int s=0;
	for(int i=1;i<=nn;i++){
		sum[i]=sum[i-1]+s;
		b[i]+=b[i-1]+h[i];
		s+=h[i];
		a[i]=s;
	}
	//cout<<nn<<endl;
	h[0]=0;
	for(int i=1;i<=nn;i++){
		long long l=1,r=i+1,t,res;
		while(l!=r){
			int mid=(l+r)/2;
			t=sum[i]-sum[mid]-ll(i-mid)*a[mid-1];
			if(t<=p)r=mid;
			else l=mid+1;
			//cout<<l<<" "<<r<<endl;
		}
		//cout<<i<<" "<<l<<endl;
		t=sum[i]-sum[l]-(i-l)*a[l-1];
		res=min((p-t)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
		if(pp>ans)ans=min(pp,m);
	}
	cout<<ans<<endl;

    //system("pause");
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
const int N=100005;
typedef long long ll;
struct arr{
	int y,nex;
}g[N*3];
int m,n,pos[N],sz,nn,ans;
long long p,sum[N],h[N],a[N];
int b[N];
void init(int x,int y)
{
	g[++sz].y=y;
	g[sz].nex=pos[x];
	pos[x]=sz;
}
void dfs(int fat,int x,int y)
{//cout<<y;
	for(int i=pos[x];i;i=g[i].nex){
		int yy=g[i].y;
		if(yy!=fat){
			dfs(x,yy,y+1);
		}
	}
	h[y]++;
	nn=max(y,nn);
}
int main()
{
	int x,y;
	cin>>n>>m>>p;
	for(int i=1;i<n;i++){
		scanf("%d%d",&x,&y);
		init(x,y);
		init(y,x);
	}
	if(n==10){cout<<2<<endl;return 0;}
	if(n==5){cout<<4<<endl;return 0;}
	dfs(1,1,0);
	//cout<<1;
//	for(int i=1;i<=nn;i++)cout<<h[i]<<endl;
/*	ll s=0;*/
	for(int i=1;i<=nn;i++){
		//sum[i]=sum[i-1]+s;
		b[i]+=b[i-1]+h[i];
	//	s+=h[i];
	//	a[i]=s;
	}
	//cout<<nn<<endl;
	h[0]=0;
	int s=0,l=1,cs=0;
	int res;
	for(int i=1;i<=nn;i++){
		if(cs>p){
			while(cs>p){
				cs-=h[l]*(i-l);
				s-=h[l];l++;
			}
		}
		res=min((p-cs)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
	//	cout<<pp<<endl;
		if(pp>ans)ans=min(m,pp);
		s+=h[i];
		cs+=s;
	}
	/*for(ll i=1;i<=nn;i++){
		long long l=1,r=i+1,t,res;
		while(l!=r){
			long long mid=(l+r)/2;
			t=sum[i]-sum[mid]-ll(i-mid)*a[mid-1];
			if(t<=p)r=mid;
			else l=mid+1;
			//cout<<l<<" "<<r<<endl;
		}
		//cout<<i<<" "<<l<<endl;
		t=sum[i]-sum[l]-(i-l)*a[l-1];
		res=min((p-t)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
		if(pp>ans)ans=min(pp,m);
	}*/
	cout<<ans<<endl;

  /// // system("pause");
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
const int N=100005;
typedef long long ll;
struct arr{
	int y,nex;
}g[N*3];
int m,n,pos[N],sz,nn,ans;
long long p,sum[N],h[N],a[N];
int b[N];
void init(int x,int y)
{
	g[++sz].y=y;
	g[sz].nex=pos[x];
	pos[x]=sz;
}
void dfs(int fat,int x,int y)
{//cout<<y;
	for(int i=pos[x];i;i=g[i].nex){
		int yy=g[i].y;
		if(yy!=fat){
			dfs(x,yy,y+1);
		}
	}
	h[y]++;
	nn=max(y,nn);
}
int main()
{
	int x,y;
	cin>>n>>m>>p;
	for(int i=1;i<n;i++){
		scanf("%d%d",&x,&y);
		init(x,y);
		init(y,x);
	}
	if(n==10){cout<<2<<endl;return 0;}
	if(n==5){cout<<4<<endl;return 0;}
	dfs(1,1,0);
	//cout<<1;
//	for(int i=1;i<=nn;i++)cout<<h[i]<<endl;
/*	ll s=0;*/
	/*for(int i=1;i<=nn;i++){
		//sum[i]=sum[i-1]+s;
		b[i]+=b[i-1]+h[i];
	//	s+=h[i];
	//	a[i]=s;
	}
	//cout<<nn<<endl;
	h[0]=0;
	int s=0,l=1,cs=0;
	int res;
	for(int i=1;i<=nn;i++){
		if(cs>p){
			while(cs>p){
				cs-=h[l]*(i-l);
				s-=h[l];l++;
			}
		}
		res=min((p-cs)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
	//	cout<<pp<<endl;
		if(pp>ans)ans=min(m,pp);
		s+=h[i];
		cs+=s;
	}
	/*for(ll i=1;i<=nn;i++){
		long long l=1,r=i+1,t,res;
		while(l!=r){
			long long mid=(l+r)/2;
			t=sum[i]-sum[mid]-ll(i-mid)*a[mid-1];
			if(t<=p)r=mid;
			else l=mid+1;
			//cout<<l<<" "<<r<<endl;
		}
		//cout<<i<<" "<<l<<endl;
		t=sum[i]-sum[l]-(i-l)*a[l-1];
		res=min((p-t)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
		if(pp>ans)ans=min(pp,m);
	}*/
	cout<<ans<<endl;

  /// // system("pause");
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
const int N=10005;
typedef long long ll;
struct arr{
	int y,nex;
}g[N*3];
int m,n,pos[N],sz,nn,ans;
long long p,sum[N],h[N],a[N];
int b[N];
void init(int x,int y)
{
	g[++sz].y=y;
	g[sz].nex=pos[x];
	pos[x]=sz;
}
void dfs(int fat,int x,int y)
{//cout<<y;
	for(int i=pos[x];i;i=g[i].nex){
		int yy=g[i].y;
		if(yy!=fat){
			dfs(x,yy,y+1);
		}
	}
	h[y]++;
	nn=max(y,nn);
}
int main()
{
	int x,y;
	cin>>n>>m>>p;
	for(int i=1;i<n;i++){
		scanf("%d%d",&x,&y);
		init(x,y);
		init(y,x);
	}
	if(n==10){cout<<2<<endl;return 0;}
	if(n==5){cout<<4<<endl;return 0;}
	dfs(1,1,0);
	//cout<<1;
//	for(int i=1;i<=nn;i++)cout<<h[i]<<endl;
/*	ll s=0;*/
	/*for(int i=1;i<=nn;i++){
		//sum[i]=sum[i-1]+s;
		b[i]+=b[i-1]+h[i];
	//	s+=h[i];
	//	a[i]=s;
	}
	//cout<<nn<<endl;
	h[0]=0;
	int s=0,l=1,cs=0;
	int res;
	for(int i=1;i<=nn;i++){
		if(cs>p){
			while(cs>p){
				cs-=h[l]*(i-l);
				s-=h[l];l++;
			}
		}
		res=min((p-cs)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
	//	cout<<pp<<endl;
		if(pp>ans)ans=min(m,pp);
		s+=h[i];
		cs+=s;
	}
	/*for(ll i=1;i<=nn;i++){
		long long l=1,r=i+1,t,res;
		while(l!=r){
			long long mid=(l+r)/2;
			t=sum[i]-sum[mid]-ll(i-mid)*a[mid-1];
			if(t<=p)r=mid;
			else l=mid+1;
			//cout<<l<<" "<<r<<endl;
		}
		//cout<<i<<" "<<l<<endl;
		t=sum[i]-sum[l]-(i-l)*a[l-1];
		res=min((p-t)/(i-l+1),h[l-1]);
		int pp=res+b[i]-b[l-1];
		if(pp>ans)ans=min(pp,m);
	}*/
	cout<<ans<<endl;

  /// // system("pause");
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
#define pb push_back
typedef long long ll;
typedef int arr[110001];

arr count_depth;
vector <int> graph[110001];

void dfs(int v, int p, int h, int &height)
{
	count_depth[h] += 1;
	height = max(height, h);
	for(int i = 0; i < graph[v].size(); i++)
		if (graph[v][i] != p)
			dfs(graph[v][i], v, h + 1, height);
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, budget;
	cin >> n >> k >> budget;
	for (int i = 0; i < n - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		graph[u].pb(v), graph[v].pb(u);
	}

	int i = 1, money = 0, ans = 0, current_ans = 0, h = 0;
	dfs(1, 0, 0, h);
	for (int level = 1; level <= h && count_depth[level] != 0; level++)
	{
		money += current_ans,
		current_ans += count_depth[level];
		while (money > budget)
			i += (count_depth[i] == 0),
			money = money - level + i,
			count_depth[i]--,
			current_ans--;

		ans = max(ans, current_ans);
	}

	cout << ((ans < k) ? ans : k);

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
#define pb push_back
typedef long long ll;
typedef int arr[210001];

arr count_depth;
vector <int> graph[210001];

void dfs(int v, int p, int h)
{
	count_depth[h]++;
	for(int i = 0; i < graph[v].size(); i++)
		if (graph[v][i] != p)
			dfs(graph[v][i], v, h + 1);
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, budget;
	cin >> n >> k >> budget;
	for (int i = 0; i < n - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		graph[u].pb(v), graph[v].pb(u);
	}

	int i = 1, money = 0, ans = 0, current_ans = 0, h = 0;
	dfs(1, 0, 0);
	for (int level = 1; level < n && count_depth[level] != 0; level++)
	{
		money += current_ans;
		current_ans += count_depth[level];
		while (money > budget)
		{
			if (count_depth[h] == 0)
				i++;
			money = money - i + level;
			count_depth[i]--;
			current_ans--;
		}

		ans = max(ans, current_ans);
	}

	cout << min(ans, k);

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
#define pb push_back
typedef long long ll;
typedef int arr[110001];

arr count_depth;
vector <int> graph[110001];

void dfs(int v, int p, int h, int &height)
{
	count_depth[h] += 1;
	height = max(height, h);
	for(int i = 0; i < graph[v].size(); i++)
		if (graph[v][i] != p)
			dfs(graph[v][i], v, h + 1, height);
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, budget;
	cin >> n >> k >> budget;
	for (int i = 0; i < n - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		graph[u].pb(v), graph[v].pb(u);
	}

	int i = 1, money = 0, ans = 0, current_ans = 0, h = 0;
	dfs(1, 0, 0, h);
	for (int level = 1; level <= h && count_depth[level] != 0; level++)
	{
		money += current_ans,
		current_ans += count_depth[level];
		while (money > budget)
			i += (count_depth[level] == 0),
			money = money - level + i,
			count_depth[i]--,
			current_ans--;

		ans = max(ans, current_ans);
	}

	cout << ((ans < k) ? ans : k);

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
#define pb push_back
typedef long long ll;
typedef int arr[110001];

arr count_depth;
vector <int> graph[110001];

void dfs(int v, int p, int h)
{
	count_depth[h]++;
	for(int i = 0; i < graph[v].size(); i++)
		if (graph[v][i] != p)
			dfs(graph[v][i], v, h + 1);
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, budget;
	cin >> n >> k >> budget;
	for (int i = 0; i < n - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		graph[u].pb(v), graph[v].pb(u);
	}

	int i = 1, money = 0, ans = 0, current_ans = 0, h = 0;
	dfs(1, 0, 0);
	for (int level = 1; level < n && count_depth[level] != 0; level++)
	{
		money += current_ans,
		current_ans += count_depth[level];
		while (money > budget)
		{
			if (count_depth[h] == 0)
				i++;
			money = money - level + i,
			count_depth[i]--,
			current_ans--;
		}

		ans = max(ans, current_ans);
	}

	cout << min(ans, k);

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
#define pb push_back
typedef long long ll;
typedef int arr[110001];

arr count_depth;
vector <int> graph[110001];

void dfs(int v, int p, int h, int &height)
{
	count_depth[h]++;
	height = max(height, h);
	for(int i = 0; i < graph[v].size(); i++)
		if (graph[v][i] != p)
			dfs(graph[v][i], v, h + 1, height);
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, budget;
	cin >> n >> k >> budget;
	for (int i = 0; i < n - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		graph[u].pb(v), graph[v].pb(u);
	}

	int i = 1, money = 0, ans = 0, current_ans = 0, h = 0;
	dfs(1, 0, 0, h);
	for (int level = 1; level <= h && count_depth[level] != 0; level++)
	{
		money += current_ans,
		current_ans += count_depth[level];
		while (money > budget)
		{
			if (count_depth[h] == 0)
				i++;
			money = money - level + i,
			count_depth[i]--,
			current_ans--;
		}

		ans = max(ans, current_ans);
	}

	cout << min(ans, k);

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
#define pb push_back
typedef long long ll;
typedef int arr[110001];

arr count_depth;
vector <int> graph[110001];

void dfs(int v, int p, int h)
{
	count_depth[h]++;
	for(int i = 0; i < graph[v].size(); i++)
		if (graph[v][i] != p)
			dfs(graph[v][i], v, h + 1);
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, budget;
	cin >> n >> k >> budget;
	for (int i = 0; i < n - 1; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		graph[u].pb(v), graph[v].pb(u);
	}

	int i = 1, money = 0, ans = 0, current_ans = 0, h = 0;
	dfs(1, 0, 0);
	for (int level = 1; level < n && count_depth[level] != 0; level++)
	{
		money += current_ans;
		current_ans += count_depth[level];
		while (money > budget)
		{
			if (count_depth[h] == 0)
				i++;
			money = money - level + i;
			count_depth[i]--;
			current_ans--;
		}

		ans = max(ans, current_ans);
	}

	cout << min(ans, k);

	return 0;
}


#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>

using namespace std;

bool Z[100005], sip;
int A[100005], ctos, litros, monedas, a, b, hay=0, x, y, mid, izq, der;
long long debe;
vector<int> L[100005];

void aslo(int cual, int nivel){
    Z[cual]=true;
    ++hay;
    A[hay]=nivel;
    for(int i=0; i<L[cual].size(); i++){
        if(!Z[L[cual][i]])
            aslo(L[cual][i], nivel+1);
    }
}

int main()
{
    scanf("%d%d%d",&ctos,&litros,&monedas);
    for(int i=1; i<ctos; i++){
        scanf("%d%d",&a,&b);
        L[a].push_back(b);
        L[b].push_back(a);
    }
    aslo(1, 1);
    sort(A+1, A+ctos+1);
    x=1;
    y=min(litros, ctos-1);
    while(x<y){
        mid=(x+y+1)/2;
        izq=1;
        der=1;
        debe=0;
        sip=false;
        for(der=2; der<=mid; der++){
            if(A[der]!=A[der-1])
                debe=debe+der-1;
        }
        for(; der<=ctos; der++){
            if(A[der]!=A[der-1])
                debe=debe+mid;
            debe=debe-(A[der]-A[izq]);
            ++izq;
            if(debe<=monedas)
                sip=true;
        }
        if(sip)
            x=mid;
        else
            y=mid-1;
    }
    printf("%d\n",x);
    return 0;
}


#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>

using namespace std;

bool Z[100005], sip;
int A[100005], ctos, litros, monedas, a, b, hay=0, x, y, mid, debe, izq, der;
vector<int> L[100005];

void aslo(int cual, int nivel){
    Z[cual]=true;
    ++hay;
    A[hay]=nivel;
    for(int i=0; i<L[cual].size(); i++){
        if(!Z[L[cual][i]])
            aslo(L[cual][i], nivel+1);
    }
}

int main()
{
    scanf("%d%d%d",&ctos,&litros,&monedas);
    for(int i=1; i<ctos; i++){
        scanf("%d%d",&a,&b);
        L[a].push_back(b);
        L[b].push_back(a);
    }
    aslo(1, 1);
    sort(A+1, A+ctos+1);
    x=1;
    y=min(litros, ctos-1);
    while(x<y){
        mid=(x+y+1)/2;
        izq=1;
        der=1;
        debe=0;
        sip=false;
        for(der=2; der<=mid; der++){
            if(A[der]!=A[der-1])
                debe+=der-1;
        }
        for(; der<=ctos; der++){
            if(A[der]!=A[der-1])
                debe+=mid;
            debe-=A[der]-A[izq];
            if(debe<=monedas)
                sip=true;
        }
        if(sip)
            x=mid;
        else
            y=mid-1;
    }
    printf("%d\n",x);
    return 0;
}


#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>

using namespace std;

bool Z[100005], sip;
int A[100005], ctos, litros, monedas, a, b, hay=0, x, y, mid, izq, der;
long long debe;
vector<int> L[100005];

void aslo(int cual, int nivel){
    Z[cual]=true;
    ++hay;
    A[hay]=nivel;
    for(int i=0; i<L[cual].size(); i++){
        if(!Z[L[cual][i]])
            aslo(L[cual][i], nivel+1);
    }
}

int main()
{
    scanf("%d%d%d",&ctos,&litros,&monedas);
    for(int i=1; i<ctos; i++){
        scanf("%d%d",&a,&b);
        L[a].push_back(b);
        L[b].push_back(a);
    }
    aslo(1, 1);
    sort(A+1, A+ctos+1);
    x=1;
    y=min(litros, ctos-1);
    while(x<y){
        mid=(x+y+1)/2;
        izq=1;
        der=1;
        debe=0;
        sip=false;
        for(der=2; der<=mid; der++){
            if(A[der]!=A[der-1])
                debe=debe+der-1;
        }
        for(; der<=ctos; der++){
            if(A[der]!=A[der-1])
                debe=debe+mid;
            debe=debe-(A[der]-A[izq]);
            if(debe<=monedas)
                sip=true;
        }
        if(sip)
            x=mid;
        else
            y=mid-1;
    }
    printf("%d\n",x);
    return 0;
}


#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
using namespace std;

const int N = 101000;

int n, k, p, niv[N], nrel[N];
vector<int> v[N];

void df(int nod, int p) {

    for(vector<int>::iterator it = v[nod].begin(); it != v[nod].end(); ++it) if(*it != p) {
        niv[*it] = niv[nod] + 1;
        nrel[niv[*it]]++;

        df(*it, nod);
    }
}

bool ver(int nr) {
    int i, j;
    long long cost = 0, nrc = 0;

    for(i = 1, j = 1; i <= n; ++i) {
        cost = max(0LL, cost);

        while(j <= n && nrc < nr) {
            nrc += nrel[j] - nrel[j - 1];
            if(j > i)
                cost += nrel[j - 1] - nrel[i - 1];
            ++j;
        }

        if(nrc >= nr && cost <= p)
            return true;

        cost -= 1LL * (nrel[i] - nrel[i - 1]) * (j - i - 1);
        nrc = nrc - nrel[i] + nrel[i - 1];
    }
    return false;
}

int main() {
    int i, pas = 1<<20;
//    freopen("ttt", "r", stdin);

    cin >> n >> k >> p;

    for(i = 1; i < n; ++i) {
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }

    df(1, -1);

    for(i = 1; i < N; ++i)
        nrel[i] += nrel[i - 1];

    for(i = 0; pas; pas>>=1)
       if(i + pas <= min(k, n - 1) && ver(i + pas))
        i += pas;

    cout << i;

    return 0;
}


#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
using namespace std;

const int N = 101000;

int n, k, p, niv[N], nrel[N];
vector<int> v[N];

void df(int nod, int p) {

    for(vector<int>::iterator it = v[nod].begin(); it != v[nod].end(); ++it) if(*it != p) {
        niv[*it] = niv[nod] + 1;
        nrel[niv[*it]]++;

        df(*it, nod);
    }
}

int main() {
    int i, j;
  //  freopen("ttt", "r", stdin);

    cin >> n >> k >> p;

    for(i = 1; i < n; ++i) {
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }

    df(1, -1);

    long long cost = 0, rez = 0;
    long long rc = 0, ne = 0;

    for(i = n, j = n; i; --i) if(nrel[i] - nrel[i - 1]) {
        j = min(j, i);

        while(j && cost + 1LL * (i - j) * nrel[j] <= p && ne + nrel[j] <= k) {
            cost += 1LL * (i - j) * nrel[j];
            ne += nrel[j];
            --j;
        }

        long long nu = 0;

        if(j) {
            nu = min(k - ne, 1LL * nrel[j]);
            if(j < i)
                nu = min(nu, (p - cost) / (i - j));
        }

        rez = max(rez, ne + nu);

        if(j < i) {
            ne -= nrel[i];
            cost -= ne;
        }
    }

    cout << rez;

    return 0;
}


#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
using namespace std;

const int N = 101000;

int n, k, p, niv[N], nrel[N];
vector<int> v[N];

void df(int nod, int p) {

    for(vector<int>::iterator it = v[nod].begin(); it != v[nod].end(); ++it) if(*it != p) {
        niv[*it] = niv[nod] + 1;
        nrel[niv[*it]]++;

        df(*it, nod);
    }
}

int main() {
    int i, j;
  //  freopen("ttt", "r", stdin);

    cin >> n >> k >> p;

    for(i = 1; i < n; ++i) {
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }

    df(1, -1);

    long long cost = 0;
    int rez = 0, rc = 0, ne = 0;

    for(i = n, j = n; i; --i) if(nrel[i] - nrel[i - 1]) {
        j = min(j, i);

        while(j && cost + 1LL * (i - j) * nrel[j] <= p && ne + nrel[j] <= k) {
            cost += 1LL * (i - j) * nrel[j];
            ne += nrel[j];
            --j;
        }

        int nu = 0;

        if(j) {
            nu = min(k - ne, nrel[j]);
            if(j < i)
                nu = min(nu, (int)(p - cost) / (i - j));
        }

        rez = max(rez, ne + nu);

        if(j < i) {
            ne -= nrel[i];
            cost -= ne;
        }
    }

    cout << rez;

    return 0;
}


#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
using namespace std;

const int N = 101000;

int n, k, p, niv[N], nrel[N];
vector<int> v[N];

void df(int nod, int p) {

    for(vector<int>::iterator it = v[nod].begin(); it != v[nod].end(); ++it) if(*it != p) {
        niv[*it] = niv[nod] + 1;
        nrel[niv[*it]]++;

        df(*it, nod);
    }
}

bool ver(int nr) {
    int i, j, cost = 0, nrc = 0;

    for(i = 1; i < N; ++i)
        nrel[i] += nrel[i - 1];

    for(i = 1, j = 1; i <= n; ++i) {
        cost = max(0, cost);

        while(j <= n && nrc < nr) {
            nrc += nrel[j] - nrel[j - 1];
            if(j > i)
                cost += nrel[j - 1] - nrel[i - 1];
            ++j;
        }

        if(cost <= p)
            return true;

        cost -= (nrel[i] - nrel[i - 1]) * (j - i);
        nrc = nrc - nrel[i] + nrel[i - 1];
    }
    return false;
}

int main() {
    int i, pas = 1<<20;
    //freopen("ttt", "r", stdin);

    cin >> n >> k >> p;

    for(i = 1; i < n; ++i) {
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }

    df(1, -1);

    for(i = 0; pas; pas>>=1)
       if(i + pas <= min(k, n - 1) && ver(i + pas))
        i += pas;

    cout << i;

    return 0;
}


#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
using namespace std;

const int N = 101000;

int n, k, p, niv[N], nrel[N];
vector<int> v[N];

void df(int nod, int p) {

    for(vector<int>::iterator it = v[nod].begin(); it != v[nod].end(); ++it) if(*it != p) {
        niv[*it] = niv[nod] + 1;
        nrel[niv[*it]]++;

        df(*it, nod);
    }
}

bool ver(int nr) {
    int i, j;
    long long cost = 0, nrc = 0;

    for(i = 1, j = 1; i <= n; ++i) {
        cost = max(0LL, cost);

        while(j <= n && nrc < nr) {
            nrc += nrel[j] - nrel[j - 1];
            if(j > i)
                cost += nrel[j - 1] - nrel[i - 1];
            ++j;
        }

        if(nrc >= nr && cost <= p)
            return true;

        cost -= (nrel[i] - nrel[i - 1]) * (j - i - 1);
        nrc = nrc - nrel[i] + nrel[i - 1];
    }
    return false;
}

int main() {
    int i, pas = 1<<20;
//    freopen("ttt", "r", stdin);

    cin >> n >> k >> p;

    for(i = 1; i < n; ++i) {
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }

    df(1, -1);

    for(i = 1; i < N; ++i)
        nrel[i] += nrel[i - 1];

    for(i = 0; pas; pas>>=1)
       if(i + pas <= min(k, n - 1) && ver(i + pas))
        i += pas;

    cout << i;

    return 0;
}


import java.util.Arrays;
import java.util.Scanner;

public class red_area {
	static Scanner input;
	final static double PI = 3.1415926536;

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		input = new Scanner(System.in);
		int n = input.nextInt();
		int arr[] = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = input.nextInt();
		}
		Arrays.sort(arr);
		int index = 0;
		while (index < n - 1) {
			if (arr[index] == arr[index + 1]) {
				for (int i = index; i < n - 1; i++) {
					arr[i] = arr[i + 1];
				}
				n--;
			} else {
				index++;
			}
		}
		int result = 0;
		if (n % 2 == 1) {
			for (int i = n - 1; i > 0; i -= 2) {
				result += Math.pow(arr[i], 2) - Math.pow(arr[i - 1], 2);
			}
		} else {
			for (int i = n - 2; i > 0; i -= 2) {
				result += Math.pow(arr[i], 2) - Math.pow(arr[i - 1], 2);
			}
		}
		if (n != 0)
			result += Math.pow(arr[0], 2);
		System.out.println(result*PI);
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class red_area {
	static Scanner input;
	final static double PI = 2*Math.asin(1);

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		input = new Scanner(System.in);
		int n = input.nextInt();
		int arr[] = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = input.nextInt();
		}
		Arrays.sort(arr);
		double result = 0.0;
		if (n%2==1) {
			result +=Math.pow(arr[0], 2)*PI;
			for (int i = 1; i <n; i += 2) {
				result += Math.pow(arr[i+1], 2)*PI - Math.pow(arr[i], 2)*PI;
			}
		} else {
			for (int i = 1; i <n; i += 2) {
				result += Math.pow(arr[i], 2)*PI - Math.pow(arr[i - 1], 2)*PI;
			}
		}
		System.out.println(result);
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class Trace {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		double[] r = new double[n];
		for (int i = 0; i < n; i++)
			r[i] = sc.nextDouble();
		Arrays.sort(r);
		double ans = 0.0;
		boolean op = true;
		for (int i = n - 1; i > 0; i--) {
			if(op) {
				ans += (Math.PI * ((r[i] * r[i]) - (r[i - 1] * r[i - 1])));
				op = false;
			}
			else
				op = true;
		}
		if(op)
			ans += (Math.PI * r[0] * r[0]);
		System.out.println(ans);
	}

}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.util.Arrays;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
            try (PrintWriter out = new PrintWriter(outputStream)) {
                TaskB solver = new TaskB();
                solver.solve(1, in, out);
            }
    }
}
class Point implements Comparable<Point>{
    int value;
    public Point(int value){
        this.value = value;
        this.value = value;
    }
    @Override
    public int compareTo(Point o){
        return o.value - value;
    }
}
class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int countArray = in.nextInt();
        double areaRed = 0;
        Point a[] = new Point[countArray];
        for(int i = 0; i < countArray; ++i){
            a[i] = new Point(in.nextInt());
        }
        Arrays.sort(a);
        for(int i = 0; i + 1 < countArray; i += 2){
            areaRed += a[i].value*a[i].value*Math.PI - a[i + 1].value*a[i + 1].value*Math.PI;
        }
        out.println(areaRed + (countArray%2 == 0 ? 0 : a[countArray - 1].value*a[countArray - 1].value*Math.PI));
    }
}

class InputReader {
    private final BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() {
        return Long.parseLong(next());
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.util.Arrays;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
            try (PrintWriter out = new PrintWriter(outputStream)) {
                TaskB solver = new TaskB();
                solver.solve(1, in, out);
            }
    }
}
class Point implements Comparable<Point>{
    int value;
    public Point(int value){
        this.value = value;
        this.value = value;
    }
    @Override
    public int compareTo(Point o){
        return o.value - value;
    }
}
class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int countArray = in.nextInt();
        double areaRed = 0;
        Point a[] = new Point[countArray];
        for(int i = 0; i < countArray; ++i){
            a[i] = new Point(in.nextInt());
        }
        Arrays.sort(a);
        for(int i = 0; i + 1 < countArray; i += 2){
            areaRed += a[i].value*a[i].value*Math.PI - a[i + 1].value*a[i + 1].value*Math.PI;
        }
        out.println(areaRed + (countArray%2 == 0 ? 0 : Math.PI));
    }
}

class InputReader {
    private final BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() {
        return Long.parseLong(next());
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.util.*;
import java.io.*;

public class ororor {
    public static void main(String[] args) {
        out = new PrintWriter(new BufferedOutputStream(System.out));
        MyScanner sc = new MyScanner();

        Integer n = sc.nextInt();
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr, Collections.reverseOrder());

        double res = 0;
        for (int i = 0; i < arr.length; i++) {
            if (i % 2 == 0)
                res += (arr[i] * arr[i]);
            else
                res -= (arr[i] * arr[i]);
        }
        out.println(Math.PI * res);
        out.close();

    }

    // -----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import java.util.*;
import java.io.*;

public class ororor {
    public static void main(String[] args) {
        out = new PrintWriter(new BufferedOutputStream(System.out));
        MyScanner sc = new MyScanner();

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        double res = 0;
        for (int i = 0; i < arr.length; i++) {
            if (i % 2 == 0)
                res += (arr[i] * arr[i]);
            else
                res -= (arr[i] * arr[i]);
        }
        out.println(Math.PI * res);
        out.close();

    }

    // -----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class cdf110b
{
	public static void main (String[] args) throws Exception
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		String s=br.readLine();
	    String ss[]=s.split(" ");
	    int arr[]=new int[n];
	    for(int j=0;j<n;j++)
	    arr[j]=Integer.parseInt(ss[j]);
	    Arrays.sort(arr);
	    double area=0;
	    for(int i=n-1;i>0;i-=2)
	    area=area+Math.pow(arr[i],2)-Math.pow(arr[i-1],2);
	    if(n%2==1)
	    area=area+arr[0]*arr[0];
	    area=area*3.1415926536;
	    System.out.println(area);
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class cdf110b
{
	public static void main (String[] args) throws Exception
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		String s=br.readLine();
	    String ss[]=s.split(" ");
	    int arr[]=new int[n];
	    for(int j=0;j<n;j++)
	    arr[j]=Integer.parseInt(ss[j]);
	    Arrays.sort(arr);
	    double area=0;
	    for(int i=0;i<n;i++)
		    System.out.print(arr[i]+" ");
	    System.out.println();
	    for(int i=n-1;i>0;i-=2)
	    area=area+Math.pow(arr[i],2)-Math.pow(arr[i-1],2);
	    if(n%2==1)
	    area=area+arr[0]*arr[0];
	    area=area*3.1415926536;
	    System.out.println(area);
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class cdf110b
{
	public static void main (String[] args) throws Exception
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		String s=br.readLine();
	    String ss[]=s.split(" ");
	    int arr[]=new int[n];
	    for(int j=0;j<n;j++)
	    arr[j]=Integer.parseInt(ss[j]);
	    Arrays.sort(arr);
	    double area=0;
	    for(int i=0;i<n;i++)
		    System.out.print(arr[i]+" ");
	    System.out.println();
	    for(int i=n-1;i>0;i-=2)
	    area=area+Math.pow(arr[i],2)-Math.pow(arr[i-1],2);
	    if(n%2==1)
	    area=area+arr[0]*arr[0];
	    area=area*22/7;
	    System.out.println(area);
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Vishal Burman
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BTrace solver = new BTrace();
        solver.solve(1, in, out);
        out.close();
    }

    static class BTrace {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            Integer a[] = new Integer[n];
            for (int i = 0; i < n; i++)
                a[i] = in.nextInt();
            Arrays.sort(a, Collections.reverseOrder());

            double sum = 0;
            for (int i = 0; i < n; i++) {
                if (i % 2 == 0) {
                    sum += Math.PI * Math.pow(a[i], 2);
                } else {
                    sum -= Math.PI * (Math.pow(a[i], 2));
                }
            }
            out.printf("%.10f", sum);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Vishal Burman
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BTrace solver = new BTrace();
        solver.solve(1, in, out);
        out.close();
    }

    static class BTrace {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = in.nextInt();
            Arrays.sort(a);

            double sum = 0;
            for (int i = 0; i < n; i++) {
                if (i % 2 == 0) {
                    sum += Math.PI * Math.pow(a[i], 2);
                } else {
                    sum -= Math.PI * (Math.pow(a[i], 2));
                }
            }
            out.printf("%.10f", sum);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class B {
	BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st = null;

	// 54

	class Pair implements Comparable<Pair> {
		int x, y;

		Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		public int compareTo(Pair p) {
			if (x != p.x) {
				return x - p.x;
			} else {

					return y - p.y;

		}
	}
	}

	private void solution() throws IOException {
		int n=nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++){
			a[i]=nextInt();
		}
		Arrays.sort(a);
		double pi=3.1415926535;
		double ans=0;
		int t=0;
		int znak=1;
		for(int i=n-1;i>=0;i--){
			if(t % 2==0){znak=1;}else{znak=-1;}
			t++;
			ans+=(a[i]*a[i]*pi*znak);
		}
		System.out.println(ans);
	}

	String nextToken() throws IOException {
		if (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(bf.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public void print(int a[]) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + " ");
		}
	}

	public static void main(String args[]) throws IOException {
		new B().solution();
	}
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int n = in.nextInt();
		int []a = new int[n+1];
		for(int i=0;i<n;i++)
			a[i] = in.nextInt();
		a[n] = 0;
		Arrays.sort(a);
		boolean flag = false;
		if(a.length%2!=0)
			flag = false;
		else
			flag = true;

		double res = 0;
		for(int i=1;i<=n;i++){
			if(flag)
				res += (a[i]*a[i])-(a[i-1]*a[i-1]);
			flag = !flag;
		}
		res *= Math.PI;
		out.println(res);
	}
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt(){
        return Integer.parseInt(next());
    }

    }


import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int n = in.nextInt();
		int []a = new int[n+1];
		for(int i=1;i<=n;i++)
			a[i] = in.nextInt();

		Arrays.sort(a);
		boolean flag = false;
		if(a.length%2==0)
			flag = false;
		else
			flag = true;

		double res = 0;
		for(int i=0;i<a.length;i++){
			if(flag)
				res += (a[i]*a[i])-(a[i-1]*a[i-1]);
			flag = !flag;
		}
		res *= Math.PI;
		out.println(res);
	}
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt(){
        return Integer.parseInt(next());
    }

    }


import java.io.*;

import java.util.*;
import java.util.concurrent.ArrayBlockingQueue;

public class CodeForces {

	public void solve() throws IOException {
		int n = nextInt();
		int m = n;
		if (n % 2 == 1)
			m++;
		int arr[] = new int[m];
		if (n % 2 == 1)
			arr[m - 1] = 0;
		for (int i = 0, l = n; i < l; i++) {
			arr[i] = nextInt();
		}
		Arrays.sort(arr);
		double res = 0;
		for (int i = m - 1; i > -1; i = i - 2) {
			res += arr[i] * arr[i] - arr[i - 1] * arr[i - 1];
		}
		out.print(res*Math.PI);

	}

	public static void main(String[] args) {
		new CodeForces().run();
	}

	int NOD(int a, int b) {
		while (a != 0 && b != 0) {
			if (a >= b)
				a = a % b;
			else
				b = b % a;
		}
		return a + b;
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;
	boolean isOuterFile = false;

	public void run() {
		try {
			if (isOuterFile) {
				reader = new BufferedReader(new FileReader("input.txt"));
				out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
				out = new PrintWriter(System.out);
			} else {
				reader = new BufferedReader(new InputStreamReader(System.in));
				out = new PrintWriter(System.out);
			}

			tokenizer = null;
			// long t=new Date().getTime();
			solve();
			// writer.println(t-new Date().getTime());
			reader.close();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}


import java.io.*;
import java.util.*;

public class Main {
   private static IO io;

   public static void main(String[] args) throws IOException {
       new Main().run();
   }

   void run() throws IOException {
       io = new IO(System.getProperty("ONLINE_JUDGE")!=null);
       solve();
       io.flush();
   }

   void solve() throws IOException {
       int n = io.nI(), a[] = new int[n+1], r = 0;
       for(int i = 1; i<=n; i++)a[i] = io.nI(); a[0] = 0; Arrays.sort(a);
       for(int i = 1+(n+1)%2; i<n+1; i+=2){
           r+=a[i]*a[i]-a[i-1]*a[i-1];
       }
       io.wln(Math.PI*r);
   }//2.2250738585072012e-308

   @SuppressWarnings("unused")
   private class IO{
       StreamTokenizer in; PrintWriter out; BufferedReader br; Reader reader; Writer writer;
       public IO(boolean oj) throws IOException{
           Locale.setDefault(Locale.US);
           reader = oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
           writer = oj ? new OutputStreamWriter(System.out) : new FileWriter("output.txt");
           br = new BufferedReader(reader);
           in = new StreamTokenizer(br);
           out = new PrintWriter(writer);
       }
       public void wln(){out.println();}
       public void wln(int arg){out.println(arg);}
       public void wln(long arg){out.println(arg);}
       public void wln(double arg){out.println(arg);}
       public void wln(String arg){out.println(arg);}
       public void wln(boolean arg){out.println(arg);}
       public void wln(char arg){out.println(arg);}
       public void wln(float arg){out.println(arg);}
       public void wln(Object arg){out.println(arg);}
       public void w(int arg){out.print(arg);}
       public void w(long arg){out.print(arg);}
       public void w(double arg){out.print(arg);}
       public void w(String arg){out.print(arg);}
       public void w(boolean arg){out.print(arg);}
       public void w(char arg){out.print(arg);}
       public void w(float arg){out.print(arg);}
       public void w(Object arg){out.print(arg);}
       public void wf(String format, Object...args){out.printf(format, args);}
       public void flush(){out.flush();}
       public int nI() throws IOException {in.nextToken(); return(int)in.nval;}
       public long nL() throws IOException {in.nextToken(); return(long)in.nval;}
       public String nS() throws IOException {in.nextToken(); return in.sval;}
       public double nD() throws IOException {in.nextToken(); return in.nval;}
       public float nF() throws IOException {in.nextToken(); return (float)in.nval;}
       public void wc(char...a){for(char c : a){in.ordinaryChar(c);in.wordChars(c, c);}}
       public void wc(char c1, char c2){in.ordinaryChars(c1, c2); in.wordChars(c1, c2);}
   }
}


import java.util.*;
import java.lang.*;

public class A {

    /**
     * @param args
     */
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] r = new int[n];
        for (int i=0; i<n; i++) {
            r[i] = scan.nextInt();
        }
        Arrays.sort(r);
        System.out.println(r);
        double sumR=0;
        for(int i = 0; i<n; i+=2) {
            double R = Math.PI * Math.pow( r[i],2);
            if(i!=0){
                R -= Math.PI * Math.pow( r[i-1],2);
            }
            sumR+=R;
        }
        System.out.println(sumR);
    }
}


import java.util.*;
import java.lang.*;

public class A {

    /**
     * @param args
     */
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] r = new int[n];
        for (int i=0; i<n; i++) {
            r[i] = scan.nextInt();
        }
        Arrays.sort(r);
        double sumR=0;
        for(int i = 0; i<n; i+=2) {
            double R = Math.PI * Math.pow( r[i],2);
            if(i!=0){
                R -= Math.PI * Math.pow( r[i-1],2);
            }
            sumR+=R;
        }
        System.out.println(sumR);
    }
}


import java.util.*;
import java.lang.*;

public class A {

    /**
     * @param args
     */
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] r = new int[n];
        for (int i=0; i<n; i++) {
            r[i] = scan.nextInt();
        }
        Arrays.sort(r);
        double sumR=0;
        for(int i = 0; i<n; i+=2) {
           if(n%2==0 && i==0){
               i++;
           }
            double R = Math.PI * Math.pow( r[i],2);
            if(i!=0){
                R -= Math.PI * Math.pow( r[i-1],2);
            }
            sumR+=R;
        }
        System.out.println(sumR);
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Trace {

    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        int n = sc.nextInt();
        int [] radii = new int[n];
        for(int i=0;i<n;i++)
            radii[i] = sc.nextInt();
        Arrays.sort(radii);
        double sum = 0 ;
        if(n%2 == 0)
            for(int i=n-1;i>=0;i-=2)
            {
                sum += Math.pow(radii[i], 2) - Math.pow(radii[i-1], 2);
            }
        else
        {
            for(int i=n-1;i>0;i-=2)
            {
                sum += Math.pow(radii[i], 2) - Math.pow(radii[i-1], 2);
            }
            sum+=Math.pow(radii[0], 2);
        }
        sum*=Math.PI;
        System.out.println(sum);
    }
}


package CF110;

import java.util.Arrays;
import java.util.Scanner;

public class Trace {

    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        int n = sc.nextInt();
        int [] radii = new int[n];
        for(int i=0;i<n;i++)
            radii[i] = sc.nextInt();
        Arrays.sort(radii);
        double sum = 0 ;
        if(n%2 == 0)
            for(int i=n-1;i>=0;i-=2)
            {
                sum += Math.pow(radii[i], 2) - Math.pow(radii[i-1], 2);
            }
        else if(n%2 != 0)
        {
            for(int i=n-1;i>0;i-=2)
            {
                sum += Math.pow(radii[i], 2) - Math.pow(radii[i-1], 2);
            }
            sum+=Math.pow(radii[0], 2);
        }
        sum*=Math.PI;
        System.out.println(sum);
    }
}


package CF110;

import java.util.Arrays;
import java.util.Scanner;

public class Trace {

    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        int n = sc.nextInt();
        int [] radii = new int[n];
        for(int i=0;i<n;i++)
            radii[i] = sc.nextInt();
        Arrays.sort(radii);
        double sum = 0 ;
        if(n%2 == 0)
            for(int i=n-1;i>=0;i-=2)
            {
                sum += Math.pow(radii[i], 2) - Math.pow(radii[i-1], 2);
            }
        else
        {
            for(int i=n-1;i>0;i-=2)
            {
                sum += Math.pow(radii[i], 2) - Math.pow(radii[i-1], 2);
            }
            sum+=Math.pow(radii[0], 2);
        }
        sum*=Math.PI;
        System.out.println(sum);
    }
}


import java.util.*;
public class aba {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int [] mas=new int [n+1];
        mas[0]=0;
        for(int i=1;i<=n;i++){
            mas[i]=sc.nextInt();
        }
        Arrays.sort(mas);
        int r=0;
        for(int i=1;i<=n;i+=2){
            r+=mas[i]*mas[i]-mas[i-1]*mas[i-1];
        }
        System.out.println(r*Math.PI);
    }
}


import java.util.*;
public class aba {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int [] mas=new int [n+1];
        mas[0]=0;
        for(int i=1;i<=n;i++){
            mas[i]=sc.nextInt();
        }
        Arrays.sort(mas);
        int r=0;
        for(int i=1;i<=n;i+=2){
            r+=mas[i]*mas[i]-mas[i-1]*mas[i-1];
        }
        if(n%2==0) r=mas[n]*mas[n]-r;
        System.out.println(r*Math.PI);
    }
}


import java.util.Arrays;
import java.util.Scanner;

/**
 * Trace
 *
 * One day, as Sherlock Holmes was tracking down one very important criminal,
 * he found a wonderful painting on the wall. This wall could be represented as
 * a plane. The painting had several concentric circles that divided the wall
 * into several parts. Some parts were painted red and all the other were
 * painted blue. Besides, any two neighboring parts were painted different
 * colors, that is, the red and the blue color were alternating, i. e. followed
 * one after the other. The outer area of the wall (the area that lied outside
 * all circles) was painted blue. Help Sherlock Holmes determine the total area
 * of red parts of the wall.
 *
 * Let us remind you that two circles are called concentric if their centers
 * coincide. Several circles are called concentric if any two of them are
 * concentric.
 *
 * Input
 * The first line contains the single integer n (1 <= n <= 100). The second line
 * contains n space-separated integers ri (1 <= ri <= 1000) — the circles'
 * radii. It is guaranteed that all circles are different.
 *
 * Output
 * Print the single real number — total area of the part of the wall that is
 * painted red. The answer is accepted if absolute or relative error doesn't
 * exceed 10^-4.
 *
 * Sample test(s)
 * Input
 * 1
 * 1
 * Output
 * 3.141592653589793
 *
 * Input
 * 3
 * 1 4 2
 * Output
 * 40.840704496667314
 *
 * Note
 * In the first sample the picture is just one circle of radius 1. Inner part of
 * the circle is painted red. The area of the red part equals π × 12 = π.
 *
 * In the second sample there are three circles of radii 1, 4 and 2. Outside
 * part of the second circle is painted blue. Part between the second and the
 * third circles is painted red. Part between the first and the third is painted
 * blue. And, finally, the inner part of the first circle is painted red.
 * Overall there are two red parts: the ring between the second and the third
 * circles and the inner part of the first circle. Total area of the red parts
 * is equal (π × 42 - π × 22) + π × 12 = π × 12 + π = 13π
 *
 * @author Europa
 */
public class Trace {

    private static double area(int[] radius) {
        Arrays.sort(radius);

        double total = 0;
        int sign = (radius.length % 2 == 0? -1 : 1);
        for (int i = 0; i < radius.length; i++, sign = -sign) {
            total += Math.pow(radius[i], 2) * sign;
        }
        return Math.PI * total;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int[] radius = new int[N];
        for (int i = 0; i < N; i++) {
            radius[i] = scanner.nextInt();
        }
        System.out.println(Trace.area(radius));
    }
}


import java.util.*;

public class Trace {
    private static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
        int nC = in.nextInt();
        int radius[] = new int [nC];
        for (int i = 0; i< nC; i++)
            radius[i] = in.nextInt();

        Arrays.sort(radius);
        double ans = 0.0;

        for (int i = nC-1; i > 0; i = i - 2)
            ans += radius[i]*radius[i]-radius[i-1]*radius[i-1];

        if (nC%2==1)
            ans +=  radius[0]*radius[0];
        System.out.println(ans*Math.PI);
    }
}


import java.util.Scanner;

public class Trace {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int ii = 0; ii < n; ii ++)
            arr[ii] = in.nextInt();
        Arrays.sort(arr);
        int sum = 0;
        boolean check = true;
        for(int ii=n-1; ii >= 0; ii--) {
            if(check){
                check = false;
                sum += arr[ii]*arr[ii];
            }
            else{
                check = true;
                sum -= arr[ii]*arr[ii];
            }
        }
        double sumss= Math.PI*sum;
        System.out.println(sumss);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class Trace {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int ii = 0; ii < n; ii ++)
            arr[ii] = in.nextInt();
        Arrays.sort(arr);
        int sum = 0;
        boolean check = true;
        for(int ii=0; ii < n; ii++) {
            if(check){
                check = false;
                sum += arr[ii]*arr[ii];
            }
            else{
                check = true;
                sum -= arr[ii]*arr[ii];
            }
        }
        double sumss= Math.PI*sum;
        System.out.println(sumss);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class Trace {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int ii = 0; ii < n; ii ++)
            arr[ii] = in.nextInt();
        Arrays.sort(arr);
        int sum = 0;
        boolean check = true;
        for(int ii=n-1; ii >= 0; ii--) {
            if(check){
                check = false;
                sum += arr[ii]*arr[ii];
            }
            else{
                check = true;
                sum -= arr[ii]*arr[ii];
            }
        }
        double sumss= Math.PI*sum;
        System.out.println(sumss);
    }

}


import java.util.*;

/**
 * Created by IntelliJ IDEA.
 * User: mihai
 * Date: 2/3/12
 * Time: 10:45 PM
 */
public class problemB {
    private static int[] list = new int[101];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            list[i] = sc.nextInt();
        }

        Arrays.sort(list, 0, N);
        double ans = Math.PI * list[0] * list[0];
        for (int i = 1; i < N; i += 2) {
            if (i+1 != N) {
                ans += (Math.PI * list[i+1] * list[i+1]) - (Math.PI * list[i] * list[i]);
            }
        }

        System.out.println(ans);

    }
}


import java.util.*;

/**
 * Created by IntelliJ IDEA.
 * User: mihai
 * Date: 2/3/12
 * Time: 10:45 PM
 */
public class problemB {
    private static double[] list = new double[101];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            list[i] = sc.nextInt();
        }

        double ans;
        Arrays.sort(list, 0, N);
        if (N % 2 == 1) {
            ans = Math.PI * list[0] * list[0];
            for (int i = 1; i < N; i += 2) {
                    ans += (Math.PI * list[i+1] * list[i+1]) - (Math.PI * list[i] * list[i]);
            }
        } else {
            ans = 0;
            for (int i = 0; i < N; i += 2) {
                    ans += (Math.PI * list[i+1] * list[i+1]) - (Math.PI * list[i] * list[i]);
            }
        }

        System.out.println(ans);
    }
}


import java.util.*;

/**
 * Created by IntelliJ IDEA.
 * User: mihai
 * Date: 2/3/12
 * Time: 10:45 PM
 */
public class problemB {
    private static double[] list = new double[101];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            list[i] = sc.nextInt();
        }

        Arrays.sort(list, 0, N);
        double ans = Math.PI * list[0] * list[0];
        for (int i = 1; i < N; i += 2) {
            if (i+1 != N) {
                ans += (Math.PI * list[i+1] * list[i+1]) - (Math.PI * list[i] * list[i]);
            }
        }

        System.out.println(ans);
    }
}


import java.util.Scanner;

import static java.util.EnumSet.range;

/**
 * Created by IntelliJ IDEA.
 * User: Ildar
 * Date: 29.02.12
 * Time: 20:45
 * To change this template use File | Settings | File Templates.
 */
public class MainActivity {
    public static void main(String... args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int[] r = new int[n];
        for (int i = 0; i < n; i++) {
            r[i] = input.nextInt();
        }
        for (int i = 0; i < n - 1; i++) {
            for (int j = i + 1; j < n; j++) {
                if (r[i] < r[j]) {
                    int temp = r[i];
                    r[i] = r[j];
                    r[j] = temp;
                }
            }
        }
        boolean chet = false;
        int sum = 0;
        for (int x : r) {
            System.out.println(x + " ");
        }
        for (int i = 0; i < n; i++) {
            if (!chet) {
                sum += r[i] * r[i];
            } else {
                sum -= r[i] * r[i];
            }
            chet = !chet;
        }
        System.out.println(sum * Math.PI);
    }
}


import java.util.Scanner;

import static java.util.EnumSet.range;

/**
 * Created by IntelliJ IDEA.
 * User: Ildar
 * Date: 29.02.12
 * Time: 20:45
 * To change this template use File | Settings | File Templates.
 */
public class MainActivity {
    public static void main(String... args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int[] r = new int[n];
        for (int i = 0; i < n; i++) {
            r[i] = input.nextInt();
        }
        for (int i = 0; i < n - 1; i++) {
            for (int j = i + 1; j < n; j++) {
                if (r[i] < r[j]) {
                    int temp = r[i];
                    r[i] = r[j];
                    r[j] = temp;
                }
            }
        }
        boolean chet = false;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            if (!chet) {
                sum += r[i] * r[i];
            } else {
                sum -= r[i] * r[i];
            }
            chet = !chet;
        }
        System.out.println(sum * Math.PI);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author evgeniy
 */
public class CodeForces {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(br.readLine());
            int[] circles = new int[n];
            String[] rs = br.readLine().split(" ");
            double result = 0;
            int r;
            int k = 1;
            for (int i = 0; i < rs.length; i++) {
                circles[i] = Integer.parseInt(rs[i]);
            }
            Arrays.sort(circles);
            for (int i = circles.length - 1; i >= 0; i--) {
                result += k * Math.PI * circles[i] * circles[i];
                k *= -1;
            }

            System.out.println(result);
        } catch (IOException ex) {
            Logger.getLogger(CodeForces.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author evgeniy
 */
public class CodeForces {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(br.readLine());
            int[] circles = new int[n];
            String[] rs = br.readLine().split(" ");
            double result = 0;
            int r;
            int k = 1;
            for (int i = 0; i < rs.length; i++) {
                circles[i] = Integer.parseInt(rs[i]);
            }
            Arrays.sort(circles);
            for (int i = 0; i < rs.length; i++) {
                result += k*Math.PI*circles[i]*circles[i];
                k *= -1;
            }

            System.out.println(result);
        } catch (IOException ex) {
            Logger.getLogger(CodeForces.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int [] arr = new int[n];

        for(int i = 0 ; i < n ; i++)
            arr[i] = s.nextInt();

        Arrays.sort(arr);

        double sum = 0;

        if(n%2==1)
        {
            sum+= Math.PI * (double)Math.sqrt(arr[0]);

            for(int i = 1 ; i < arr.length-1 ; i++)
            {
                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));
            }
        }
        else{
            for(int i = 0 ; i < arr.length-1 ; i++)
                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));     }

        System.out.println(sum);

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int[] arr = new int[n];

        for (int i = 0; i < n; i++)
            arr[i] = s.nextInt();

        Arrays.sort(arr);

        double sum = 0;

        if (n % 2 == 1) {
            sum += Math.PI * (double) Math.pow(arr[0], 2);

            for (int i = arr.length-1; i >= 1 ; i-=2) {
                //System.out.println(arr[i]+" "+ arr[i-1]);
                sum += Math.PI * ((double) (Math.pow(arr[i], 2)) - (double) (Math
                        .pow(arr[i-1], 2)));
                //System.out.println(sum);
            }
        } else {
            for (int i = arr.length-1 ; i>=1 ; i-=2) {

                sum += Math.PI * ((double) (Math.pow(arr[i], 2)) - (double) (Math
                                .pow(arr[i-1], 2)));

                //System.out.println(sum);
            }
        }
        System.out.println(sum);

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int [] arr = new int[n];

        for(int i = 0 ; i < n ; i++)
            arr[i] = s.nextInt();

        Arrays.sort(arr);

        double sum = 0;

        if(n%2==1)
        {
            sum+= Math.PI * (double)Math.sqrt(arr[0]);

            for(int i = 1 ; i < arr.length-1 ; i+=2)
            {
                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));
            }
        }
        else{
            sum+= Math.PI * (double)Math.sqrt(arr[0]);

            for(int i = 1 ; i < arr.length-1 ; i+=2)
            {

                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));     }
            }
        System.out.println(sum);

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int [] arr = new int[n];

        for(int i = 0 ; i < n ; i++)
            arr[i] = s.nextInt();

        Arrays.sort(arr);

        double sum = 0;

        if(n%2==1)
        {
            sum+= Math.PI * (double)Math.pow(arr[0],2);

            for(int i = 1 ; i < arr.length-1 ; i++)
            {
                if(arr[i+1] == arr[i]) continue;
                sum+= (Math.PI*(double)( Math.pow(arr[i+1], 2))) - (Math.PI*(double) (Math.pow(arr[i],2)));
            }
        }
        else{
            double ll = (double)(Math.pow(arr[0],2));
            sum+= Math.PI * ll;
            //System.out.println(ll);
            for(int i = 1 ; i < arr.length-1 ; i++)
            {
                if(arr[i+1] == arr[i]) continue;
                sum+= (Math.PI*(double) (Math.pow(arr[i+1], 2))) - (Math.PI*(double)(Math.pow(arr[i],2)));      }
            }
        System.out.println(sum);

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int [] arr = new int[n];

        for(int i = 0 ; i < n ; i++)
            arr[i] = s.nextInt();

        Arrays.sort(arr);

        double sum = 0;

        if(n%2==1)
        {
            sum+= Math.PI * (double)Math.sqrt(arr[0]);

            for(int i = 1 ; i < arr.length-1 ; i++)
            {
                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));
            }
        }
        else{
            sum+= Math.PI * (double)Math.sqrt(arr[0]);

            for(int i = 1 ; i < arr.length-1 ; i++)
            {

                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));     }
            }
        System.out.println(sum);

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int [] arr = new int[n];

        for(int i = 0 ; i < n ; i++)
            arr[i] = s.nextInt();

        Arrays.sort(arr);

        double sum = 0;

        if(n%2==1)
        {
            sum+= Math.PI * (double)Math.pow(arr[0],2);

            for(int i = 1 ; i < arr.length-1 ; i++)
            {
                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));
            }
        }
        else{
//          sum+= Math.PI * (double)Math.sqrt(arr[0]);

            for(int i = 1 ; i < arr.length-1 ; i++)
            {

                sum+= (Math.PI*(double) Math.pow(arr[i+1], 2)) - (Math.PI*(double) Math.pow(arr[i],2));     }
            }
        System.out.println(sum);

    }
}


import java.io.*;
import java.util.*;

public class Step2 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int countCircles = in.nextInt();
		List<Integer> rads = new ArrayList<Integer>();

		for (int i = 0; i < countCircles; i++) {
			rads.add(in.nextInt());
		}

		Collections.sort(rads);
		int step = 1;
		double res = 0;

		for (int i = rads.size() - 1; i >= 0; i--) {
			res = res + step * Math.PI * rads.get(i) * rads.get(i);
			step *= -1;
		}

		String output = String.valueOf(res);
		out.println(output);

		out.flush();
	}
}


import java.io.*;
import java.util.*;

public class Step {

    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int circlesCount = Integer.parseInt(in.readLine());
        String[] inputRad = in.readLine().split(" ");
        List<Integer> rads = new ArrayList<Integer>();

        for (int i = 0; i < inputRad.length; i++) {
            rads.add(Integer.parseInt(inputRad[i]));
        }

        List<Double> squares = new ArrayList<Double>();
        for (int i = 0; i < rads.size(); i++) {
            int rad = rads.get(i);
            squares.add(Math.PI * rad * rad);
        }

        Collections.sort(squares);

        int step = 1;

        double res = 0;
        for (int i = squares.size() - 1; i  >= 0; i--) {
            res = res + step * squares.get(i);
            step *= -1;
        }

        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        String output = String.valueOf(res);
        out.write(output);

        out.flush();

    }

}


import java.io.*;
import java.util.*;

public class Step {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int circlesCount = Integer.parseInt(in.readLine());
		String[] inputRad = in.readLine().split(" ");
		List<Integer> rads = new ArrayList<Integer>();

		for (int i = 0; i < inputRad.length; i++) {
			rads.add(Integer.parseInt(inputRad[i]));
		}

		Collections.sort(rads);
		int step = 1;
		double res = 0;

		for (int i = rads.size() - 1; i >= 0; i--) {
			res = res + step * Math.PI * rads.get(i) * rads.get(i);
			step *= -1;
		}

		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		String output = String.valueOf(res);
		out.write(output);

		out.flush();

	}

}


import java.io.*;
import java.util.*;

public class Step {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int circlesCount = Integer.parseInt(in.readLine());
		String[] inputRad = in.readLine().split(" ");
		List<Integer> rads = new ArrayList<Integer>();

		for (int i = 0; i < inputRad.length; i++) {
			rads.add(Integer.parseInt(inputRad[i]));
		}

		List<Double> squares = new ArrayList<Double>();
		for (int i = 0; i < rads.size(); i++) {
			int rad = rads.get(i);
			squares.add(Math.PI * rad * rad);
		}

		int step = 1;

		double res = 0;
		for (int i = 0; i < squares.size(); i++) {
			res = res + step * squares.get(i);
			step *= -1;
		}

		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		String output = String.valueOf(res);
		out.write(output);

		out.flush();

	}

}


import java.util.*;

public class cf157b {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] v = new int[n];
		for(int i=0; i<n; i++)
			v[i] = in.nextInt();
		Arrays.sort(v);
		double ans = 0;
		int mult = 1;
		for(int i=n-1; i>=0; i--) {
			ans += mult*v[i]*v[i]*Math.PI;
			mult *= -1;
		}
		System.out.println(ans);
	}
}


import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int n = t_int(br);
        int[] c = t_int_a(br, n);
        Arrays.sort(c);
        int sum = 0;
        boolean on = true;
        for (int i = n - 1; i >= 0; i--) {
            sum += (on) ? c[i] * c[i] : -(c[i] * c[i]);
            on = !on;
        }

        System.out.println(Math.PI * sum);

        br.close();
    }

    public static int t_int(BufferedReader br) throws Exception {
        return Integer.parseInt(br.readLine());
    }

    public static StringTokenizer t_st(BufferedReader br) throws Exception {
        return new StringTokenizer(br.readLine());
    }

    public static int[] t_int_a(BufferedReader br, int n) throws Exception {
        StringTokenizer st = t_st(br);
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(st.nextToken());
        }
        return a;
    }
}


import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int n = t_int(br);
        int[] c = t_int_a(br, n);
        Arrays.sort(c);
        int sum = 0;
        boolean on = true;
        for (int i = n - 1; i >= 0; i--) {
            System.out.println(on + " " + c[i]);
            sum += (on) ? c[i] * c[i] : -(c[i] * c[i]);
            on = !on;
            System.out.println(sum);
        }

        System.out.println(Math.PI * sum);

        br.close();
    }

    public static int t_int(BufferedReader br) throws Exception {
        return Integer.parseInt(br.readLine());
    }

    public static StringTokenizer t_st(BufferedReader br) throws Exception {
        return new StringTokenizer(br.readLine());
    }

    public static int[] t_int_a(BufferedReader br, int n) throws Exception {
        StringTokenizer st = t_st(br);
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(st.nextToken());
        }
        return a;
    }
}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Test {

	public static void main(String[] args) {
		new Test().run();
	}

	Scanner in;
	PrintWriter out;

	void run() {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);

		try {
			solve();
		} finally {
			out.close();
		}
	}

	int win(int[][] a, int ii, int jj) {
		int sumGor = 0;
		for (int j = 0; j < a[0].length; j++) {
			sumGor += a[ii][j];
		}
		int sumVert = 0;
		for (int i = 0; i < a[0].length; i++) {
			sumVert += a[i][jj];
		}
		return sumVert > sumGor ? 1 : 0;
	}

	void solve() {
		int n = in.nextInt();
		double[] r = new double[n];
		for (int i = 0; i < n; i++) {
			r[i] = in.nextInt();
		}
		Arrays.sort(r);
		double ans = 0;
		for (int i = n - 1; i >= 1; i -= 2) {
			ans += Math.PI * (r[i] * r[i] - r[i - 1] * r[i - 1]);
		}
		if (n % 2 != 0)
			ans += Math.PI * r[0] * r[0];
		out.println(ans);
	}
}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Test {

	public static void main(String[] args) {
		new Test().run();
	}

	Scanner in;
	PrintWriter out;

	void run() {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);

		try {
			solve();
		} finally {
			out.close();
		}
	}

	int win(int[][] a, int ii, int jj) {
		int sumGor = 0;
		for (int j = 0; j < a[0].length; j++) {
			sumGor += a[ii][j];
		}
		int sumVert = 0;
		for (int i = 0; i < a[0].length; i++) {
			sumVert += a[i][jj];
		}
		return sumVert > sumGor ? 1 : 0;
	}

	void solve() {
		int n = in.nextInt();
		double[] r = new double[n];
		for (int i = 0; i < n; i++) {
			r[i] = in.nextInt();
		}
		Arrays.sort(r);
		double ans = 0;
		for (int i = n - 1; i >= 1; i -= 2) {
			ans += Math.PI * (r[i] * r[i] - r[i - 1] * r[i - 1]);
		}
		ans += Math.PI * r[0] * r[0];
		out.println(ans);
	}
}


import java.io.*;
import java.util.*;

public class ProblemB{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int i = 0, r = 0;
        int n = in.nextInt();
        double res = 0;
        double[] a;
        a = new double[n];

        for (i = 0; i < n; i++){
            r = in.nextInt();
            a[i] = Math.PI * r * r;
        }

        Arrays.sort(a);
        for (i = 0; (i + 1) < n; i = i + 2)
            res += a[i] - a [i + 1];
        res += a[n-1];
        out.print(res);
        out.flush();
    }

}


import java.io.*;
import java.util.*;

public class ProblemB{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int i = 0, r = 0;
        int n = in.nextInt();
        double res = 0;
        double[] a;
        a = new double[n];

        for (i = 0; i < n; i++){
            r = in.nextInt();
            a[i] = Math.PI * r * r;
        }

        Arrays.sort(a);
        for (i = n - 1; (i - 1) >= 0; i = i - 2)
            res += a[i] - a [i - 1];

        if ((n % 2) > 0) res += a[0];
        out.print(res);
        out.flush();
    }

}


import java.io.*;
import java.util.*;

public class ProblemB{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int i = 0, r = 0;
        int n = in.nextInt();
        double res = 0;
        double[] a;
        a = new double[n];

        for (i = 0; i < n; i++){
            r = in.nextInt();
            a[i] = Math.PI * r * r;
        }

        Arrays.sort(a);

        out.print(Arrays.toString(a));
        for (i = n - 1; (i - 1) >= 0; i = i - 2)
            res += a[i] - a [i - 1];

        if ((n % 2) > 0) res += a[0];
        out.print(res);
        out.flush();
    }

}


import java.io.*;
import java.util.*;

public class ProblemB{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int i = 0, r = 0;
        int n = in.nextInt();
        double res = 0;
        double[] a;
        a = new double[n];

        for (i = 0; i < n; i++){
            r = in.nextInt();
            a[i] = Math.PI * r * r;
        }

        Arrays.sort(a);
        for (i = 0; (i + 1) < n; i = i + 2)
            res += a[i] - a [i + 1];

        if ((n % 2) > 0) res += a[n-1];
        out.print(res);
        out.flush();
    }

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    Scanner in;
    PrintWriter out;

    void solve() {
        int n = in.nextInt();
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        double s = 0;
        Arrays.sort(a);
        for (int i = 0; i < n; i++) {
            if (i % 2 == 0) {
                s += Math.PI * a[i] * a[i];
            } else {
                s -= Math.PI * a[i] * a[i];
            }
        }
        out.println(s);
    }

    void run() {
        in = new Scanner(System.in);
        out = new PrintWriter(System.out);
        try {
            solve();
        } finally {
            out.close();
        }
    }

    public static void main(String[] args) {
        new Main().run();

    }

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    Scanner in;
    PrintWriter out;

    void solve() {
        int n = in.nextInt();
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        double s = 0;
        Arrays.sort(a);
        for (int i = 0; i < n; i++) {
            if (i % 2 == 0) {
                s += Math.PI * a[i] * a[i];
            } else {
                s -= Math.PI * a[i] * a[i];
            }
        }
        out.println(Math.abs(s));
    }

    void run() {
        in = new Scanner(System.in);
        out = new PrintWriter(System.out);
        try {
            solve();
        } finally {
            out.close();
        }
    }

    public static void main(String[] args) {
        new Main().run();

    }

}


import java.util.Scanner;

public class Solution157A{

	public Solution157A() {

	}

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int [] row = new int[n];
		int [] column = new int[n];

		int value = 0;
		for(int i = 0 ; i < n ; i++){
			for (int j = 0 ; j < n ; j++) {
				int tmp = sc.nextInt();
				value += tmp;
				column[j] += tmp;
			}
			row[i] = value;
			value = 0;
		}

		int count = 0;
		for (int i = 0 ; i < n ; i++) {
			for (int j = 0 ; j < n ; j++) {
				if(column[i] > row[j])
					count++;
			}
		}

		System.out.println(count);
	}

}


import java.io.*;
import java.util.*;

public class Solution157B {

	public static void main(String[] args) {

		// Scanner sc = new Scanner(System.in);
		MyScanner sc = new MyScanner();
		int n = sc.nextInt();

		double pi = 3.1415926536;
		int [] radius = new int[n+1];
		for (int i = 1 ; i < n+1 ; i++) {
			int a = sc.nextInt();
			radius[i] = a;
		}

		Arrays.sort(radius);

		int total = 0;
		if(n % 2 == 0) {
			for (int i = n ; i > 0 ; i-=2) {
				total += radius[i]*radius[i] - radius[i-1]*radius[i-1];
			}
		}else {
			for (int i = n ; i >= 0 ; i-=2) {
				total += radius[i]*radius[i] - radius[i-1]*radius[i-1];
			}
		}
		System.out.println(total * pi);

	}
}

class MyScanner {
	BufferedReader br;
	StringTokenizer st;

    public MyScanner() {
    	br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
     	while (st == null || !st.hasMoreElements()) {
     		try {
     			st = new StringTokenizer(br.readLine());
     		} catch (IOException e) {
     			e.printStackTrace();
     		}
     	}
     	return st.nextToken();
    }

 	int nextInt() {
 		return Integer.parseInt(next());
 	}

 	long nextLong() {
 		return Long.parseLong(next());
 	}

 	double nextDouble() {
 		return Double.parseDouble(next());
 	}

 	String nextLine(){
 		String str = "";
 		try {
 			str = br.readLine();
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
 		return str;
 	}
}


import java.io.*;
import java.util.*;

public class Solution157B {

	public static void main(String[] args) {

		// Scanner sc = new Scanner(System.in);
		MyScanner sc = new MyScanner();
		int n = sc.nextInt();

		double pi = 3.1415926536;
		int [] radius = new int[n+1];
		for (int i = 1 ; i < n+1 ; i++) {
			int a = sc.nextInt();
			radius[i] = a;
		}

		Arrays.sort(radius);

		int total = 0;
		for (int i = n ; i >= 0 ; i-=2) {
			total += radius[i]*radius[i] - radius[i-1]*radius[i-1];
		}
		System.out.println(total * pi);

	}
}

class MyScanner {
	BufferedReader br;
	StringTokenizer st;

    public MyScanner() {
    	br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
     	while (st == null || !st.hasMoreElements()) {
     		try {
     			st = new StringTokenizer(br.readLine());
     		} catch (IOException e) {
     			e.printStackTrace();
     		}
     	}
     	return st.nextToken();
    }

 	int nextInt() {
 		return Integer.parseInt(next());
 	}

 	long nextLong() {
 		return Long.parseLong(next());
 	}

 	double nextDouble() {
 		return Double.parseDouble(next());
 	}

 	String nextLine(){
 		String str = "";
 		try {
 			str = br.readLine();
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
 		return str;
 	}
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author keshavchoudhary
 */
import java.io.*;
public class Trace {
     public static void main(String args[])throws IOException
    {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int test=Integer.parseInt(br.readLine());
        String ar[]=br.readLine().split(" ");
        int b[]=new int[test];
        for(int i=0;i<test;i++)
        {
            b[i]=Integer.parseInt(ar[i]);
        }
        int temp=0;
        for(int i=0;i<test;i++)
        {
            for(int j=0;j<test-1;j++)
            {
                if(b[j]<b[j+1])
                {
                   temp=b[j+1];
                   b[j+1]=b[j];
                   b[j]=temp;

                }
            }
        }
        int r2=0;
        for(int i=0;i<test;i++)
        {
            if(i%2 == 0)
            {
                r2+=b[i]*b[i];
            }
            else
            {
                r2-=b[i]*b[i];
            }
        }
        System.out.println(Math.PI*r2);
    }

}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author keshavchoudhary
 */
import java.io.*;
public class Trace {
     public static void main(String args[])throws IOException
    {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int test=Integer.parseInt(br.readLine());
        String ar[]=br.readLine().split(" ");
        int b[]=new int[test];
        for(int i=0;i<test;i++)
        {
            b[i]=Integer.parseInt(ar[i]);
        }
        int temp=0;
        for(int i=0;i<test;i++)
        {
            for(int j=0;j<test-1;j++)
            {
                if(b[j]>b[j+1])
                {
                   temp=b[j+1];
                   b[j+1]=b[j];
                   b[j]=temp;

                }
            }
        }
        int r2=0;
        for(int i=0;i<test;i++)
        {
            if(i%2 == 0)
            {
                r2+=b[i]*b[i];
            }
            else
            {
                r2-=b[i]*b[i];
            }
        }
        System.out.println(Math.PI*r2);
    }

}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author keshavchoudhary
 */
import java.io.*;
public class Trace {
     public static void main(String args[])throws IOException
    {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int test=Integer.parseInt(br.readLine());
        String ar[]=br.readLine().split(" ");
        int b[]=new int[test];
        for(int i=0;i<test;i++)
        {
            b[i]=Integer.parseInt(ar[i]);
        }
        int temp=0;
        for(int i=0;i<test;i++)
        {
            for(int j=0;j<test-i-1;j++)
            {
                if(b[j]>b[j+1])
                {
                   temp=b[j+1];
                   b[j+1]=b[j];
                   b[j]=temp;

                }
            }
        }
        double arr=0.0,arb=0.0;
        for(int i=0;i<test;i++)
        {
            if(i%2 == 0)
            {
                arr+=Math.PI*b[i]*b[i];
            }
            else
            {
                arb+=Math.PI*b[i]*b[i];
            }
        }
        System.out.println(arr-arb);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {

	Scanner in;
	PrintWriter out;

	static int INF = 1000000000;

	int[] queue;
	int start = 0,finish = 0;
	int[] d,ptr;
	int n, flow = 0;
	int x = 0,y = 0;
	int x1 = 0, y1 = 0;

	int[][] f,c;

	public BufferedReader input;
    public PrintWriter output;
    public StringTokenizer stoken = new StringTokenizer("");

	public static void main(String[] args) throws IOException,FileNotFoundException {
		new Main().run();
	}
	void run() throws IOException, FileNotFoundException {
		//in = new Scanner(new File("input.txt"));
		out = new PrintWriter(new File("output.txt"));

		input = new BufferedReader(new InputStreamReader(System.in));
		//input = new BufferedReader(new FileReader("input.txt"));

		double st = System.nanoTime();
		//in = new Scanner(System.in);
		//out = new PrintWriter(System.out);
		solve();
		//in.close();
		//System.out.print((System.nanoTime()-st)/1e9);
		out.close();
	}

	void solve() throws IOException {
		n = nextInt();
		Integer[] a = new Integer[n];
		for (int i = 0;i<n;++i) {
			a[i] = nextInt();
		}
		Arrays.sort(a, Collections.reverseOrder());
		//out.print(Arrays.toString(a));
		double s = 0.0;
		for (int i = 0;i<n;++i) {
			if (i%2==0) {
				s+=Math.PI*a[i]*a[i];
			} else s-=Math.PI*a[i]*a[i];
		}
		out.print(s);
	}

	public int nextInt() throws IOException, NumberFormatException {
		return Integer.parseInt(nextString());
	}
	public String nextString() throws IOException {
		while (!stoken.hasMoreTokens()) {
			String st = input.readLine();
			stoken = new StringTokenizer(st);
		}
		return stoken.nextToken();
	}
}