#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define REP(i,n) for(__typeof(n) i=0; i<(n); i++)
#define REP2(i,n) for(__typeof(n) i=1; i<=(n); i++)
#define FOR(i,a,b) for(__typeof(b) i=(a); i<=(b); i++)
#define INF (1<<30)
#define PI 3.14159265358979323846264338327950
#define PB(x) push_back(x)
#define ALL(x) x.begin(),x.end()
#define SZ size()
#define eps 1e-4
#define VI vector<int>
#define VS vector<string>
#define LL long long
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define CLEAR(x) memset(x,0,sizeof(x));
#define MAX(a,b) (a>b?a:b)
#define MIN(a,b) (a<b?a:b)

using namespace std;
bool is_palindrome(const string &s, int start, int end) {
 int sz = end - start + 1;
if (sz % 2 == 0) {
  int middle = start + sz/2;
    int i;
  for (i = 0; middle - 1 - i >= 0 && middle+i <= end && s[middle-1-i] == s[middle+i]; i++);
   if (middle - i - 1 < 0 || middle+i > end)
    return true;
 } else {
   int middle = start + sz/2;
int i;
 for (i = 1; middle - i >= 0 && middle+i <= end && s[middle-i]==s[middle+i]; i++);
   if (middle - i < 0 || middle+i > end)
return true;
 }
return false;
}
//Polya-Burnside theory : (n^6+3n^4+12n^3+8n^2)/24
int euclidd,euclidx,euclidy;
void extendedeuclid(int a,int b)
{
	if(b==0)
	{
		euclidd=a;
		euclidx=1;
		euclidy=0;
		return ;
	}
	extendedeuclid(b,a%b);
	int d1,x1,y1;
	d1=euclidd;
	x1=euclidx;
	y1=euclidy;
	euclidx=y1;
	euclidy=x1-((a/b)*y1);
}
double area_triangle(double x1,double y1,double x2,double y2,double x3,double y3)
{
    double a;
    a=x1*(y2-y3)+y1*(x3-x2)+((x2*y3)-(y2*x3))+eps;
    a=a/2+eps;
return a;
}
double dist_2point(double x1,double y1,double x2,double y2)
{
    double d;
    d=sqrt(pow((x1-x2),2)+pow((y1-y2),2));
    return d;
}
int binary_search(int a[],int n,int l,int u)
{
	int mid;
  if(l>u)
	  return 0;
  mid=floor(l+u)/2;
  if(a[mid]==n)
	  return mid;
  else if(a[mid]>n)
	  binary_search(a,n,l,mid-1);
	  else
	  binary_search(a,n,mid+1,u);
}
int gcd(int a,int b)
{
while(b>0)
{
a=a%b;
a=a^b;
b=b^a;
a=a^b;
}
return a;
}
long lcm(long a,long b)
{
    long x=(a*b)/gcd(a,b);
    return x;
}
long is_prime(long n)
{
	long ii;
if (n == 1)
 return 0;
if (n == 2)
 return 1;
if (n%2 == 0)
 return 0;
for (ii=3;ii*ii<=n;ii=ii+2)
     if (n%ii == 0)
           return 0;
return 1;
}

int main()
{
ios_base::sync_with_stdio(false);
long int n,i;
long long int r[1001],s=0,a;
scanf("%ld",&n);
for(i=0;i<n;i++)
{
       scanf("%ld",&r[i]);
}
sort(r,r+n);
for(i=n-1;i>=0;i--)
{

  //a=2*acos(0.0)*r[i]*r[i];
 // printf("%lf ",a);
 a=r[i]*r[i];
  if(i%2==0)
  {
    s+=a;
   // prv=a;
  }
  else
  {
     // prv-=a;
      s-=a;
  }
}
double d=s;
printf("%.15lf\n",d*2*acos(0.0));
return 0;
}


#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define REP(i,n) for(__typeof(n) i=0; i<(n); i++)
#define REP2(i,n) for(__typeof(n) i=1; i<=(n); i++)
#define FOR(i,a,b) for(__typeof(b) i=(a); i<=(b); i++)
#define INF (1<<30)
#define PI 3.14159265358979323846264338327950
#define PB(x) push_back(x)
#define ALL(x) x.begin(),x.end()
#define SZ size()
#define eps 1e-4
#define VI vector<int>
#define VS vector<string>
#define LL long long
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define CLEAR(x) memset(x,0,sizeof(x));
#define MAX(a,b) (a>b?a:b)
#define MIN(a,b) (a<b?a:b)

using namespace std;
bool is_palindrome(const string &s, int start, int end) {
 int sz = end - start + 1;
if (sz % 2 == 0) {
  int middle = start + sz/2;
    int i;
  for (i = 0; middle - 1 - i >= 0 && middle+i <= end && s[middle-1-i] == s[middle+i]; i++);
   if (middle - i - 1 < 0 || middle+i > end)
    return true;
 } else {
   int middle = start + sz/2;
int i;
 for (i = 1; middle - i >= 0 && middle+i <= end && s[middle-i]==s[middle+i]; i++);
   if (middle - i < 0 || middle+i > end)
return true;
 }
return false;
}
//Polya-Burnside theory : (n^6+3n^4+12n^3+8n^2)/24
int euclidd,euclidx,euclidy;
void extendedeuclid(int a,int b)
{
	if(b==0)
	{
		euclidd=a;
		euclidx=1;
		euclidy=0;
		return ;
	}
	extendedeuclid(b,a%b);
	int d1,x1,y1;
	d1=euclidd;
	x1=euclidx;
	y1=euclidy;
	euclidx=y1;
	euclidy=x1-((a/b)*y1);
}
double area_triangle(double x1,double y1,double x2,double y2,double x3,double y3)
{
    double a;
    a=x1*(y2-y3)+y1*(x3-x2)+((x2*y3)-(y2*x3))+eps;
    a=a/2+eps;
return a;
}
double dist_2point(double x1,double y1,double x2,double y2)
{
    double d;
    d=sqrt(pow((x1-x2),2)+pow((y1-y2),2));
    return d;
}
int binary_search(int a[],int n,int l,int u)
{
	int mid;
  if(l>u)
	  return 0;
  mid=floor(l+u)/2;
  if(a[mid]==n)
	  return mid;
  else if(a[mid]>n)
	  binary_search(a,n,l,mid-1);
	  else
	  binary_search(a,n,mid+1,u);
}
int gcd(int a,int b)
{
while(b>0)
{
a=a%b;
a=a^b;
b=b^a;
a=a^b;
}
return a;
}
long lcm(long a,long b)
{
    long x=(a*b)/gcd(a,b);
    return x;
}
long is_prime(long n)
{
	long ii;
if (n == 1)
 return 0;
if (n == 2)
 return 1;
if (n%2 == 0)
 return 0;
for (ii=3;ii*ii<=n;ii=ii+2)
     if (n%ii == 0)
           return 0;
return 1;
}

int main()
{
ios_base::sync_with_stdio(false);
int n,i;
double r[1001],a,s=0.0,prv;
scanf("%d",&n);
for(i=0;i<n;i++)
{
       scanf("%lf",&r[i]);
}
sort(r,r+n);
for(i=n-1;i>=0;i--)
{

  a=PI*r[i]*r[i];
 // printf("%lf ",a);
  if(i%2==0)
  {
    s+=a;
   // prv=a;
  }
  else
  {
     // prv-=a;
      s-=a;
  }
}
printf("%.15lf\n",s);
return 0;
}


#include<iostream>
#include<stdio.h>
using namespace std;
double p=3.141592653589793;
double x=0;
long long a[111], n, i;
main(){
       cin>>n;
       for(i=1;i<=n;i++){
                         cin>>a[i];
                         }
       sort(a+1,a+n+1);
       for(i=n;i>=1;i-=2)
        x+=a[i]*a[i]-a[i-1]*a[i-1];

                          x*=p;
                          printf("%.20f\n",x);
                          //system("pause");
        }


#include<iostream>
using namespace std;
double p=3.141592653589793;
double x=0;
long long a[111], n, i;
main(){
       cin>>n;
       for(i=1;i<=n;i++){
                         cin>>a[i];
                         }
       sort(a+1,a+n+1);
       for(i=n;i>=1;i-=2)
        x+=a[i]*a[i]-a[i-1]*a[i-1];

                          x*=p;
                          printf("%.20f\n",x);
                          //system("pause");
        }


#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
float p=3.141592653589793;
float x=0;
long long a[111], n, i;
main(){
       cin>>n;
       for(i=1;i<=n;i++){
                         cin>>a[i];
                         }
       sort(a+1,a+n+1);
       for(i=n;i>=1;i-=2)
        x+=a[i]*a[i]-a[i-1]*a[i-1];

                          x*=p;
                          printf("%.20f\n",x);
                          //system("pause");
        }


#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
long double p=3.141592653589793;
long double x=0;
long long a[111], n, i;
main(){
       cin>>n;
       for(i=1;i<=n;i++){
                         cin>>a[i];
                         }
       sort(a+1,a+n+1);
       for(i=n;i>=1;i-=2)
        x+=a[i]*a[i]-a[i-1]*a[i-1];

                          x*=p;
                          printf("%.20f\n",x);
                          //system("pause");
        }


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define N 3.1415926536
int cmp (const void *a,const void *b)
{
    return *(int *)b-*(int *)a;
}
int main ()
{
    int n,a[105],i;
    scanf ("%d",&n);
    for (i=0; i<n; i++)
        scanf ("%d",&a[i]);
    qsort (a,n,sizeof (a[0]),cmp);
    int k=1;
    double x=0;
    double s=0;
    for (i=0; i<n; i++)
    {
        a[i]=k*a[i];
        x=N*a[i]*a[i];
        s=s+k*x;
        k=-k;
    }
    printf ("%.10f\n",s);
    return 0;
}


#include <iostream>
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
using namespace std;
/*int main()
    int n,i,j,m,a[1000];
    while(scanf("%d",&n)!=EOF)
    {
        printf("0! = 1\n");
        if(n>0) printf("1! = 1\n");
        for(m=2; m<=n; m++)
        {
            memset(a,0,sizeof(a));
            a[0]=1;
            int temp,x=0,y=0;
            for(i=2; i<=m; i++)
            {
                for(j=0; j<=y; j++)
                {
                    temp=a[j]*i+x;
                    a[j]=temp%10;
                    x=temp/10;
                }
                while(x!=0)
                {
                    y++;
                    a[y]=x%10;
                    x=x/10;
                }
            }
            printf("%d! = ",m);
            for(i=y; i>=0; i--)
                printf("%d",a[i]);
            printf("\n");

        }
        printf("\n");
    }
}
int main()
{
    int t,n,m,i,j;
    long long a[201][201];
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d",&n,&m);
        for(i=1;i<=n;i++)
        {
            a[i][0]=1;
            a[i][1]=1;
        }
        for(i=1;i<=m;i++)
        {
           a[0][i]=1;
           a[1][i]=1;
        }
        for(i=2;i<=n;i++)
        {
            for(j=2;j<=m;j++)
            {
               if(i<j) a[i][j]=a[i][i];
               else a[i][j]=a[i][j-1]+a[i-j][j];
            }
        }
        printf("%lld\n",a[n][m]);
    }
}
int main()
{
   int n,m,k,i,t;
   long long s;
   while(scanf("%d",&k)!=EOF)
   {
   while(k--)
   {
       scanf("%d%d",&n,&m);
       t=n-m;
       s=pow(2,n-m);
       printf("%lld\n",s);
   }
   }
}
int main()
{
    int i,c,flag;
    char str[205];
    while(scanf("%s",str)!=EOF)
    {
        c=strlen(str);
        for(i=0; i<c; i++)
        {
            if(str[i]=='W'&&str[i+1]=='U'&&str[i+2]=='B')
            {
                str[i]=str[i+1]=str[i+2]='0';
                i=i+2;
            }
            else flag=i;
        }
        for(i=0; i<c; i++)
        {
            if(str[i]!='0')
            {
                if(i!=flag)
                {
                    printf("%c",str[i]);
                }
                else
                {
                    printf("%c\n",str[i]);
                    break;
                }
            }

            else if(i>0&&str[i-1]!='0')
            {
                printf(" ");
                i=i+2;
            }
        }
    }
}
int main()
{
    int n,i;
    long long a[32];
    a[0]=1;
    a[2]=3;
    for(i=4; i<=30; i+=2)

        a[i]=4*a[i-2]-a[i-4];
    while(scanf("%d",&n)!=EOF)
    {

        if(n==-1) break;
        else if(n%2==0) printf("%lld\n",a[n]);
         else printf("0\n");
    }
}
int main()
{
    int n,i;
    long long a[56];
    while(scanf("%d",&n)!=EOF)
    {
        a[1]=1;a[2]=1;a[3]=2;
        for(i=4;i<=n;i++)
            a[i]=a[i-1]+a[i-3]+1;
        printf("%lld\n",a[n]);
    }
}
int a[50],b[50];
int kuaipai(int xiao,int da)
{
    int keng1=a[xiao];
    int keng2=b[xiao];
    while(xiao<da)
    {
        while(xiao<da&&b[da]>keng2)
            da--;
        b[xiao]=b[da];
        a[xiao]=a[da];
        while(xiao<da&&b[xiao]<keng2)
            xiao++;
        b[da]=b[xiao];
        a[da]=a[xiao];
    }
    b[xiao]=keng2;
    a[xiao]=keng1;
    return xiao;
}
void pp(int s,int t)
{
    if(s<t)
    {
    int k=kuaipai(s,t);
    pp(s,k-1);
    pp(k+1,t);
    }
}
int main()
{
    int n,m,i,j,k;
    while(scanf("%d",&n)!=EOF)
    {
        for(i=1;i<=n;i++)
        {
            scanf("%d%d",&a[i],&b[i]);
        }
        pp(1,n);
        m=1;
        k=b[1];
        for(i=1;i<=n;i++)
        {
            if(a[i]>=k)
            {
                k=b[i];
                m++;
            }
        }
        printf("%d\n",m);
    }
}
int main()
{
    int n,m,i;
    double k;
    while(scanf("%d",&n)!=EOF)
    {
        for(i=1;i<=n;i++)
        {

            scanf("%d",&m);
            k=pow(3,m);
            printf("%.lf\n",k);
        }
    }

}
void paixu(int a[200],int n)
{
    int i,j,t;4
5 7 8 4
9 5 3 2
1 6 6 4
9 5 7 3
    for(i=0; i<n-1; i++)
        for(j=0; j<n-1-i; j++)
            if(a[j]<a[j+1])
            {
                t=a[j];
                a[j]=a[j+1];
                a[j+1]=t;
            }
}
int main()
{
    int n,m,i;
    int qujian[201],juli[200];
    while(scanf("%d%d",&n,&m)!=EOF)
    {

        for(i=0; i<n; i++)
            scanf("%d",&qujian[i]);
        paixu(qujian,n);
        for(i=0; i<n-1; i++)
            juli[i]=qujian[i]-qujian[i+1]-1;
        paixu(juli,n-1);
        int zong=qujian[0]-qujian[n-1]+1;
        int devide=0;
        for(i=0;i<m-1;i++)
            zong=zong-juli[i];
        printf("%d\n",zong);
    }
}
int a[1001];
int main()
{
    int n,i,j,max;
    while(scanf("%d",&n)!=EOF)
    {
        for(i=0; i<n; i++)
            scanf("%d",&a[i]);
        int m=0;
        for(i=0; i<n; i++)
        {
            if(a[i]==0) continue;
            else
            {
                max=a[i];
                for(j=i+1; j<n; j++)
                {
                    if(a[j]<=max)
                    {
                        max=a[j];
                        a[j]=0;
                    }
                }
                m++;
            }
        }
        printf("%d\n",m);
    }
}
int a[101][101],d[101][101];
int main()
{
    int n,i,j;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=i;j++)
        scanf("%d",&d[i][j]);
    }
    for(j=1;j<n;j++)
        a[n][j]=d[n][j];
    for(i=n;i>1;i--)
        for(j=1;j<=i;j++)
    {
        if(a[i][j]>a[i][j+1])
            a[i-1][j]=a[i][j]+d[i-1][j];
        else a[i-1][j]=a[i][j+1]+d[i-1][j];
    }
    printf("%d\n",a[1][1]);
}
int main()
{
    int t,n,m,i,j,k;
    int tiji[1001],jiazhi[1001],zong[1001];
    scanf("%d",&t);
    while(t--)
    {
        memset(zong,0,sizeof(zong));
        scanf("%d%d",&n,&m);
        for(i=0; i<n; i++)
            scanf("%d",&tiji[i]);
        for(i=0; i<n; i++)
            scanf("%d",&jiazhi[i]);
        for(i=0; i<n; i++)
        {
            for(j=m; j>=tiji[i]; j--)
            {
                k=zong[j-tiji[i]]+jiazhi[i];
                if(zong[j]<k)
                    zong[j]=k;
            }
        }
        printf("%d\n",zong[m]);

    }
}
int main()
{
    int i,j,n,m,c[501][501];
    char x[501],y[501];
    while(gets(x) && gets(y))
    {
        n=strlen(x);
        m=strlen(y);
        for(i=0; i<n; i++)
            c[i][0]=0;
        for(j=0; j<m; j++)
            c[0][j]=0;
        for(i=1; i<=n; i++)
        {
            for(j=1; j<=m; j++)
            {
                if(x[i-1]==y[j-1])
                    c[i][j]=c[i-1][j-1]+1;
                else
                {
                    if(c[i-1][j]>c[i][j-1])
                        c[i][j]=c[i-1][j];
                    else c[i][j]=c[i][j-1];
                }
            }
        }
        printf("%d\n",c[n][m]);
    }
}
int main()
{
    int n,m,a[31][31],i,j,count=0 ;
    int  x[31],y[31];
    memset(x,0,sizeof(x));
    memset(y,0,sizeof(y));
    scanf("%d",&n);
    for(i=0;i<n;i++)
    for(j=0;j<n;j++)
        scanf("%d",&a[i][j]);
    for(i=0;i<n;i++)
        for(j=0;j<n;j++)
        {
        x[i]+=a[i][j];
        y[i]+=a[j][i];
        }
        for(i=0;i<n;i++)
            for(j=0;j<n;j++)
            if(x[i]<y[j])
            count++;
        printf("%d\n",count);

}*/
int main()
{
    int n,m,i,j,a[101],t,sum1=0,sum2=0;
    double pi=3.141592653589,k;
    scanf("%d",&n);
    for(i=0;i<n;i++)
     scanf("%d",&a[i]);
    for(i=0;i<n-1;i++)
        for(j=0;j<n-1-i;j++)
    {
        if(a[j]<a[j+1])
        {
        t=a[j];
        a[j]=a[j+1];
        a[j+1]=t;
        }
    }
    for(i=0;i<n;i++)
    {
        if(i%2==0)
            sum1+=a[i]*a[i];
        else sum2+=a[i]*a[i];
    }
    k=pi*(sum1-sum2);
    printf("%.10lf\n",k);
    return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <stdio.h>
#define PI 3.141592653589793
using namespace std;
bool cmp(int x,int y)
{
    return x>y;
}
int l[200];
int main()
{
    int n,i;
    scanf("%d",&n);
    for(i=0; i<n; i++)
        scanf("%d",&l[i]);
    sort(l,l+n,cmp);
    double sum=0;
    if(n&1)
    {
        for(i=0; i<n-2; i+=2)
            sum+=PI*(l[i]*l[i]-l[i+1]*l[i+1]);
        sum+=PI*l[n-1]*l[n-1];
    }
    else
    {
        for(i=0; i<n-1; i+=2)
            sum+=PI*(l[i]*l[i]-l[i+1]*l[i+1]);
    }
    printf("%.10lf\n",sum);
    return 0;
}


#include <stdio.h>
#define PI 3.1415926536

void sort(double a[],int n)
{
	int i,j;
	double t;
	for(i = 0;i<=n-2;i++)
	{
		for(j = 0;j<=n-i-2;j++)
		{
			if(a[j]>a[j+1])
			{
				 t = a[j];
				a[j] = a[j+1];
				a[j+1] = t;
			}
		}
	}
}
int main()
{
	double s;
	int n,i;
	double a[110];
	double flag;
	while(scanf("%d",&n)!=EOF)
	{
		for(i = 0;i<n;i++)
		scanf("%llf",&a[i]);
		sort(a,n);
		flag = 1.000000;
		s = 0.00000000000000000000;
		for(i = 0;i<n;i++)
		{
			s = s + PI * a[i] * a[i]*flag;
			flag = -flag;
		}
		printf("%.10llf\n",s);
	}
	return 0;
}


#include <stdio.h>
#include <algorithm>
#define P 3.1415926536
using namespace std;

int main()
{
	int n,i;
	int s[110];
	double sum = 0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&s[i]);
	sort(s,s+n);
	for(i=n-1;i>=0;i--)
	{
		if(i%2==1)
		{
			if(i%2==0)
				sum += s[i]*s[i]*P;
			else
				sum -= s[i]*s[i]*P;
		}
		else
		{
			if(i%2==0)
				sum += s[i]*s[i]*P;
			else
				sum -= s[i]*s[i]*P;
		}
	}
	printf("%lf\n",sum);
	return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define PI 3.141592653589793
using namespace std;
bool cmp(int x,int y)
{
    return x>y;
}

int main()
{
    int n,i;
	int a[200];
    while(cin>>n)
	{
    for(i=0; i<n; i++)
       cin>>a[i];
    sort(a,a+n,cmp);
    double sum=0;
    if(n&1)
    {
        for(i=0; i<n-2; i=i+2)
            sum+=PI*(a[i]*a[i]-a[i+1]*a[i+1]);
        sum+=PI*a[n-1]*a[n-1];
    }
    else
    {
        for(i=0; i<n-1; i=i+2)
            sum+=PI*(a[i]*a[i]-a[i+1]*a[i+1]);
    }
    printf("%.10lf\n",sum);
	}
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
const double P = 3.1415926536;
using namespace std;

int cmp(const void *a,const void *b)
{
    return *(int *)b - *(int *)a;
}
int a[10001];
int main()
{
    int n;
scanf("%d",&n);
    for(int i = 0;i<n;i++)
        scanf("%d",&a[i]);
    qsort(a,n,sizeof(a[0]),cmp);
    double s = 0;
   int  l = 1;
   for(int i = 0;i<n;i++)
   {
       s += a[i] * a[i] * l;
       l = l*(-1);
   }
   s = s *P;
   printf("%.10lf\n",s);

    return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define PI 3.141592653589793
using namespace std;
bool cmp(int x,int y)
{
    return x>y;
}

int main()
{
    int n,i;
	int a[200];
    cin>>n;
    for(i=0; i<n; i++)
       cin>>a[i];
    sort(a,a+n,cmp);
    double sum=0;
    if(n)
    {
        for(i=0; i<n-2; i=i+2)
            sum+=PI*(a[i]*a[i]-a[i+1]*a[i+1]);
        sum+=PI*a[n-1]*a[n-1];
    }
    else
    {
        for(i=0; i<n-1; i=i+2)
            sum+=PI*(a[i]*a[i]-a[i+1]*a[i+1]);
    }
    printf("%.10lf\n",sum);
    return 0;
}


#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#define P 3.1415926536
using namespace std;
int main()
{
    int n,i,flag = 1,sum = 0;
    int a[110];
    double s;
    scanf("%d",&n);
    for(i = 0;i < n;i++)
        scanf("%d",&a[i]);
    sort(a,a+n);
    for(i = n-1;i >= 0;i-- )
    {
        if(flag == 1)
        {
            sum += a[i] * a[i];
            flag = 0;
        }
        else if(flag == 0)
        {
            sum -= a[i] * a[i];
            flag = 1;
        }
    }
    s = sum * P;
    printf ("%lf\n",s);
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include<algorithm>

using namespace std;
#define p 3.141592653589793;
int a[200];
int s[200];
int cmp(int a, int b)
{
    return a < b;
}
int main()
{
    int n, i, j;
    int s0;
    double s1;
    scanf("%d",&n);
    for(i=0; i<n; i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+n,cmp);
    for(i=0; i<n; i++)
    {
        s[i]=a[i]*a[i];
    }
    if(n%2)
    {
        s0=s[0];
        for(i=2; i<n; i+=2)
        {
            s0+=s[i]-s[i-1];
        }
    }
    else
    {
        s0=0;
        for(i=1; i<n; i+=2)
        {
            s0+=s[i]-s[i-1];
        }
    }
    s1=s0*1.0*p;
    printf("%.10lf\n",s1);
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int  cmp(int x,int y)
{
    return x<y;
}
int main()
{
    int m,i,j;
    int a[105];
    double n,s;
    memset(a,0,sizeof(a));
    scanf("%d",&m);
    for(i=0;i<m;i++)
        scanf("%d",&a[i]);
      sort(a,a+m,cmp);
      s=0;n=0;
      for(i=m-1;i>=0;i=i-2)
      {
          if(i>=1)
            n+=(a[i]*a[i])-(a[i-1]*a[i-1]);
            else
                n+=a[0]*a[0];
      }
      s=n*3.1415926536;
      printf("%.10lf\n",s);
      return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#define PI acos(-1.0)
using namespace std;
int cmp(int a,int b)
{
    return a>b;
}
int main()
{
    int n,num[1000],i;
    while(cin>>n)
    {
        double sum=0;
        for(i=1;i<=n;i++)
            cin>>num[i];
        sort(num+1,num+1+n,cmp);
        for(i=1;i<=n;i+=2)
        {
            sum+=(num[i]*num[i]*PI-num[i+1]*num[i+1]*PI);
        }
       printf("%.10lf\n",sum);
    }
    return 0;
}


#include <stdio.h>
#include <math.h>
#include <algorithm>
#define pi 3.1415926536
using namespace std;
int main()
{
    int n , i ;
    int r[200] ;
    double m = 0 ;
    scanf("%d", &n);
    for(i = 0 ; i < n ; i++)
        scanf("%d", &r[i]);
    sort(r,r+n);
    for(i = n-1 ; i >= 0 ; i = i - 2 )
    {
        if(i == 0 )
            m += r[i]*r[i]*pi ;
        else
            m += (  r[i]*r[i]-r[i-1]*r[i-1] )*pi ;
    }
    printf("%.10lf\n", m);
    return 0;
}


#include <stdio.h>
#include <algorithm>
#define P 3.1415926536
using namespace std;

int main()
{
	int n,i;
	int s[110],s1[110];
	double sum = 0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&s[i]);
	sort(s,s+n);
	for(i=0;i<n;i++)
		s1[i] = s[n-1-i];
	for(i=0;i<n;i++)
	{
		if(i%2==0)
		{
			sum += s1[i]*s1[i]*P;
		}
		else
			sum -= s1[i]*s1[i]*P;
	}
	printf("%.4lf\n",sum);
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include<algorithm>

using namespace std;
#define p 3.1415926536;
int a[200];
int s[200];
int cmp(int a, int b)
{
    return a < b;
}
int main()
{
    int n, i, j;
    int s0;
    double s1;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+n,cmp);
    for(i=0;i<n;i++)
    {
        s[i]=a[i]*a[i];
    }
    s0=s[0];
    for(i=2;i<n;i+=2)
    {
        s0+=s[i]-s[i-1];
    }
    s1=s0*1.0*p;
    printf("%.10lf\n",s1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PI 3.141592653589793

int r[120];

int cmp (const void *a,const void *b)
{
    return *(int *) a - *(int *)b;
}

int main()
{
    int n;
    scanf ("%d",&n);

    int i,k;
    for (i =0;i < n;i++)
        scanf ("%d",&r[i]);

    double sum = 0;

    qsort (r,n,sizeof (r[0]),cmp);

    int s = -1;
    for (i = 0;i < n;i++)
    {
        s = -s;
        sum += s * (double)(r[i] * r[i] * PI);
    }

    printf ("%.10lf\n",sum);

    return 0;
}


#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

#define bublic public
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define pb push_back
#define ppb pop_back()
#define mp make_pair
#define sz size()
#define It(x) x::iterator
#define CIt(x) x::const_iterator
#define For(i, st, en) for(__typeof(en) i=(st); i<=(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(__typeof(n) i=0; i<(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)

template <class _T> inline _T sqr(const _T& x) { return x * x; }
template <class _T> inline string tostr(const _T& a) { ostringstream os(""); os << a; return os.str(); }
template <class _T> inline istream& operator << (istream& is, const _T& a) { is.putback(a); return is; }

typedef long double ld;

// Constants
const ld PI = 3.1415926535897932384626433832795;
const ld EPS = 1e-11;

// Types
typedef signed   long long ll;
typedef signed   long long i64;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < ld > VD;
typedef vector < int > VI;
typedef vector < bool > VB;
typedef vector < string > VS;
typedef map < string, int > MSI;
typedef pair < int, int > PII;

int  n;
int r[1100];
int main()
{
#ifdef ROOM_311
	freopen("z.in", "rt", stdin);
	freopen("z.out", "wt", stdout);
#endif

	cout << setiosflags(ios::fixed) << setprecision(10);

	cin >> n;
	forn(i, n)
		cin >> r[i];
	sort(r, r + n);
	//reverse(r, r + n);
	if (n == 1)
	{
		cout << PI;
		return 0;
	}
	bool k1 = 0;
	int res = 0;
	for(int i = 0; i < n; i++)
	{
		if (i == 0 && n % 2 != 0)
			k1 = 1;
		else
		if (n % 2 != 0 && (i + 1) % 2 != 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
		else
		if (n % 2 == 0 && (i + 1) % 2 == 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
	}
	if (k1)
		cout << res * PI + PI;
	else
		cout << res * PI;
	return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define bublic public
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define sz size()
#define It(x) x::iterator
#define CIt(x) x::const_iterator
#define For(i, st, en) for(__typeof(en) i=(st); i<=(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(__typeof(n) i=0; i<(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)

typedef long double ld;

// Constants
const ld PI = 3.1415926535897932384626433832795;
const ld EPS = 1e-11;

// Types
typedef signed   long long ll;
typedef signed   long long i64;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < ld > VD;
typedef vector < int > VI;
typedef vector < bool > VB;
typedef vector < string > VS;
typedef map < string, int > MSI;
typedef pair < int, int > PII;

int  n;
i64 r[1100];
int main()
{
#ifdef ROOM_311
	freopen("z.in", "rt", stdin);
	freopen("z.out", "wt", stdout);
#endif

	cout << setiosflags(ios::fixed) << setprecision(10);

	cin >> n;
	forn(i, n)
		cin >> r[i];
	sort(r, r + n);

	bool k1 = 0;
	i64 res = 0;

	for(int i = 0; i < n; i++)
	{
		if (i == 0 && n % 2 != 0)
			k1 = 1;
		else
		if (i > 0 && n % 2 != 0 && (i + 1) % 2 != 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
		else
		if (i > 0 && n % 2 == 0 && (i + 1) % 2 == 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
	}
	if (k1)
		cout << PI * (res + r[0]);
	else
		cout << res * PI;
	return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define bublic public
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define sz size()
#define It(x) x::iterator
#define CIt(x) x::const_iterator
#define For(i, st, en) for(__typeof(en) i=(st); i<=(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(__typeof(n) i=0; i<(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)

typedef long double ld;

// Constants
const ld PI = 3.1415926535897932384626433832795;
const ld EPS = 1e-11;

// Types
typedef signed   long long ll;
typedef signed   long long i64;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < ld > VD;
typedef vector < int > VI;
typedef vector < bool > VB;
typedef vector < string > VS;
typedef map < string, int > MSI;
typedef pair < int, int > PII;

int  n;
i64 r[1100];
int main()
{
#ifdef ROOM_311
	freopen("z.in", "rt", stdin);
	freopen("z.out", "wt", stdout);
#endif

	cout << setiosflags(ios::fixed) << setprecision(10);

	cin >> n;
	forn(i, n)
		cin >> r[i];
	sort(r, r + n);

	i64 res = 0;

	for(int i = 1; i < n; i++)
	{
		if (n % 2 != 0 && (i + 1) % 2 != 0)
			res += r[i] * r[i] - r[i - 1] * r[i - 1];
		else
		if (n % 2 == 0 && (i + 1) % 2 == 0)
			res += r[i] * r[i] - r[i - 1] * r[i - 1];
	}
	if (n % 2 == 0)
		cout << PI * res;
	else
		cout << PI * (res + r[0] * r[0]);
	return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define bublic public
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define sz size()
#define It(x) x::iterator
#define CIt(x) x::const_iterator
#define For(i, st, en) for(__typeof(en) i=(st); i<=(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(__typeof(n) i=0; i<(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)

typedef long double ld;

// Constants
const ld PI = 3.1415926535897932384626433832795;
const ld EPS = 1e-11;

// Types
typedef signed   long long ll;
typedef signed   long long i64;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < ld > VD;
typedef vector < int > VI;
typedef vector < bool > VB;
typedef vector < string > VS;
typedef map < string, int > MSI;
typedef pair < int, int > PII;

int  n;
i64 r[1100];
int main()
{
#ifdef ROOM_311
	freopen("z.in", "rt", stdin);
	freopen("z.out", "wt", stdout);
#endif

	cout << setiosflags(ios::fixed) << setprecision(10);

	cin >> n;
	forn(i, n)
		cin >> r[i];
	sort(r, r + n);

	bool k1 = 0;
	i64 res = 0;

	for(int i = 0; i < n; i++)
	{
		if (i == 0 && n % 2 != 0)
			k1 = 1;
		else
		if (n % 2 != 0 && (i + 1) % 2 != 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
		else
		if (n % 2 == 0 && (i + 1) % 2 == 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
	}
	if (k1)
		cout << PI * (res + r[0]);
	else
		cout << res * PI;
	return 0;
}


#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

#define bublic public
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define pb push_back
#define ppb pop_back()
#define mp make_pair
#define sz size()
#define It(x) x::iterator
#define CIt(x) x::const_iterator
#define For(i, st, en) for(__typeof(en) i=(st); i<=(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(__typeof(n) i=0; i<(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)

template <class _T> inline _T sqr(const _T& x) { return x * x; }
template <class _T> inline string tostr(const _T& a) { ostringstream os(""); os << a; return os.str(); }
template <class _T> inline istream& operator << (istream& is, const _T& a) { is.putback(a); return is; }

typedef long double ld;

// Constants
const ld PI = 3.1415926535897932384626433832795;
const ld EPS = 1e-11;

// Types
typedef signed   long long ll;
typedef signed   long long i64;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < ld > VD;
typedef vector < int > VI;
typedef vector < bool > VB;
typedef vector < string > VS;
typedef map < string, int > MSI;
typedef pair < int, int > PII;

int  n;
int r[1100];
int main()
{
#ifdef ROOM_311
	freopen("z.in", "rt", stdin);
	freopen("z.out", "wt", stdout);
#endif

	cout << setiosflags(ios::fixed) << setprecision(10);

	cin >> n;
	forn(i, n)
		cin >> r[i];
	sort(r, r + n);
	//reverse(r, r + n);
	if (n == 1)
	{
		cout << PI;
		return 0;
	}
	ld res = 0;
	for(int i = 0; i < n; i++)
	{
		if (i == 0 && n % 2 != 0)
			res += PI * r[i] * r[i];
		else
		if (n % 2 != 0 && (i + 1) % 2 != 0)
			res += PI * (r[i] * r[i] - r[i - 1] * r[i - 1]);
		else
		if (n % 2 == 0 && (i + 1) % 2 == 0)
			res += PI * (r[i] * r[i] - r[i - 1] * r[i - 1]);
		//cout << res << endl;
	}
	cout << res;
	return 0;
}


#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <algorithm>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

#define bublic public
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
#define pb push_back
#define ppb pop_back()
#define mp make_pair
#define sz size()
#define It(x) x::iterator
#define CIt(x) x::const_iterator
#define For(i, st, en) for(__typeof(en) i=(st); i<=(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(__typeof(n) i=0; i<(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)

template <class _T> inline _T sqr(const _T& x) { return x * x; }
template <class _T> inline string tostr(const _T& a) { ostringstream os(""); os << a; return os.str(); }
template <class _T> inline istream& operator << (istream& is, const _T& a) { is.putback(a); return is; }

typedef long double ld;

// Constants
const ld PI = 3.1415926535897932384626433832795;
const ld EPS = 1e-11;

// Types
typedef signed   long long ll;
typedef signed   long long i64;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < ld > VD;
typedef vector < int > VI;
typedef vector < bool > VB;
typedef vector < string > VS;
typedef map < string, int > MSI;
typedef pair < int, int > PII;

int  n;
int r[1100];
int main()
{
#ifdef ROOM_311
	freopen("z.in", "rt", stdin);
	freopen("z.out", "wt", stdout);
#endif

	cout << setiosflags(ios::fixed) << setprecision(10);

	cin >> n;
	forn(i, n)
		cin >> r[i];
	sort(r, r + n);
	//reverse(r, r + n);
	if (n == 1)
	{
		cout << PI;
		return 0;
	}
	bool k1 = 0;
	int res = 0;
	for(int i = 0; i < n; i++)
	{
		if (i == 0 && n % 2 != 0)
			k1 = 1;
		else
		if (n % 2 != 0 && (i + 1) % 2 != 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
		else
		if (n % 2 == 0 && (i + 1) % 2 == 0)
			res += (r[i] * r[i] - r[i - 1] * r[i - 1]);
	}
	if (k1)
		cout << res * PI + PI;
	else
		cout << res * PI;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define N 1034
#define PI 3.141592653589793

double A[N],R[N];

int main(){
    int n;
    double si=0,sp=0;
    cin>>n;
    for( int i=1;i<=n;i++){
        cin>>R[i];
    }
    sort(R+1,R+n+1);

    for( int i=1;i<=n;i++){
        A[i]=R[i]*R[i]-R[i-1]*R[i-1];
    }
    for( int i=1;i<=n;i++){
        if(i & 1){
            si+=A[i];
        }else{
            sp+=A[i];
        }
    }
    printf("%.10lf\n",(si>sp)?PI*si:PI*sp);

 return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define N 1034
#define PI 3.141592653589793

int A[N],R[N];

int main(){
    int n;
    double si=0,sp=0;
    cin>>n;
    for( int i=1;i<=n;i++){
        cin>>R[i];
    }
    sort(R+1,R+n+1);

    for( int i=1;i<=n;i++){
        A[i]=R[i]*R[i]-R[i-1]*R[i-1];
    }
    for( int i=1;i<=n;i++){
        if(i & 1){
            si+=A[i];
        }else{
            sp+=A[i];
        }
    }
    printf("%.10lf\n",(si>sp)?PI*si:PI*sp);

 return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define N 1034
#define PI acos(-1)
int A[N],R[N];

int main(){
    int n;
    double si=0,sp=0;
    cin>>n;
    for( int i=1;i<=n;i++){
        cin>>R[i];
    }
    sort(R+1,R+n+1);

    for( int i=1;i<=n;i++){
        A[i]=R[i]*R[i]-R[i-1]*R[i-1];
    }
    for( int i=1;i<=n;i++){
        if(i & 1){
            si+=A[i];
        }else{
            sp+=A[i];
        }
    }
    printf("%.10lf\n",(si>sp)?PI*si:PI*sp);
 return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define MIR(A,n) for( int i=0;i<n;i++)cout<<A[i]<<char(i+1==n?10:32)
#define N 1034
#define PI 3.141592653589793

double A[N],R[N];

int main(){
    int n;
    double si=0,sp=0;
    cin>>n;
    for( int i=1;i<=n;i++){
        cin>>R[i];
    }
    sort(R+1,R+n+1);

    for( int i=1;i<=n;i++){
        A[i] = PI*(R[i]*R[i] - R[i-1] * R[i-1]);
    }
    for( int i=1;i<=n;i++){
        if(i & 1){
            si += A[i];
        }else{
            sp += A[i];
        }
    }
    printf("%.10lf\n",(si>sp)?si:sp);

 return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define MIR(A,n) for( int i=0;i<n;i++)cout<<A[i]<<char(i+1==n?10:32)
#define N 1034
#define PI 3.141592653589793

double A[N],R[N];

int main(){
    int n;
    double si=0,sp=0;
    cin>>n;
    for( int i=1;i<=n;i++){
        cin>>R[i];
    }
    sort(R+1,R+n+1);

    for( int i=1;i<=n;i++){
        A[i] = PI*(R[i]*R[i] - R[i-1] * R[i-1]);
    }
    for(int i=n;i>=0;i-=2){
        si += A[i];
    }
    printf("%.10lf\n",si);

 return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
# define PI 3.1415926536;
using namespace std;

int main()
{
    int n,i,j,x,temp;
    double area;
    int arr[102]={0};
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>x;
        arr[i]=x;
    }
    sort(arr,arr+n);
    area=0;
   for(i=n-1;i>=2;i=i-2)
   {
       area+=(arr[i]*arr[i]-arr[i-1]*arr[i-1]);
   }
   if(n%2==0)
     area=area*PI;
   if(n%2!=0)
    area=(area+arr[0]*arr[0])*PI;
   printf("%.10lf\n",area);
   return 0;
}


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

int main()
{
    int n;
    double arr[110]={0};
    double ans;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%lf",&arr[i]);
    }
    sort(arr,arr+n);
    ans=0;
    if(n%2==1){
    ans=arr[0]*arr[0];
    for(int i=2;i<n;i+=2)
    {
        ans+=(arr[i]*arr[i])-(arr[i-1]*arr[i-1]);
    }

    }
    else
    {
        for(int i=1;i<n;i+=2)
        {
            ans+=(arr[i]*arr[i])-(arr[i-1]*arr[i-1]);
        }
    }
    ans*=acos(-1);
    printf("%.10f\n",ans);
    return 0;
}


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

int main()
{
    int n;
    double arr[110]={0};
    double ans;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%lf",&arr[i]);
    }
    sort(arr,arr+n);
    ans=arr[0]*arr[0];
    for(int i=2;i<n;i+=2)
    {
        ans+=(arr[i]*arr[i])-(arr[i-1]*arr[i-1]);
    }
    ans*=acos(-1);
    printf("%.10f\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
# define PI 3.1415926536;
using namespace std;

int main()
{
    int n,i,j,x,temp;
    double area;
    int arr[102]={0};
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>x;
        arr[i]=x;
    }
    sort(arr,arr+n);
    area=0;
   for(i=n-1;i>=1;i=i-2)
   {
       area+=(arr[i]*arr[i]-arr[i-1]*arr[i-1]);
   }
   if(n%2==0)
     area=area*PI;
   if(n%2!=0)
   area=PI(area+arr[0]*arr[0]);
   printf("%.10lf\n",area);
   return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
# define PI 3.1415926536;
using namespace std;

int main()
{
    int n,i,j,x,temp;
    double area;
    int arr[102]={0};
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>x;
        arr[i]=x;
    }
    sort(arr,arr+n);
    area=0;
   for(i=n-1;i>=1;i=i-2)
   {
       area+=(arr[i]*arr[i]-arr[i-1]*arr[i-1]);
   }

   if(n%2==0)
     area=area*PI;
   if(n%2!=0)
     area=(area+arr[0]*arr[0])*PI;
   printf("%.10lf\n",area);
   return 0;
}


#include <iostream>
#include <fstream>
#include <cstdio>
#include <climits>
#include <vector>
#include <map>
#include <list>
#include <deque>
#include <stack>
#include <set>
#include <string>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <cmath>

using namespace std;

bool myfunc(int a, int b)
{
	return a > b;
}

int main()
{
	int n;
	vector<int> radius(n, 0);
	cin >> n;
	long double area = 0;
	for(int i = 0; i < n; i++)
		cin >> radius[i];
	sort(radius.begin(), radius.end(), myfunc);
	for(int i = 0; i < n; i++)
		if (i % 2 == 0)
			area += radius[i] * radius[i];
		else
			area -= radius[i] * radius[i];
	printf("%.10lf\n",area * (long double) 3.1415926536);
	return 0;
}


#include <iostream>
#include <fstream>
#include <cstdio>
#include <climits>
#include <vector>
#include <map>
#include <list>
#include <deque>
#include <stack>
#include <set>
#include <string>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <cmath>

using namespace std;

bool myfunc(int a, int b)
{
	return a > b;
}

int main()
{
	int n;
	vector<int> radius(n, 0);
	cin >> n;
	long double area = 0;
	for(int i = 0; i < n; i++)
		cin >> radius[i];
	sort(radius.begin(), radius.end(), myfunc);
	for(int i = 0; i < n; i++)
		if (i % 2 == 0)
			area += radius[i] * radius[i];
		else
			area -= radius[i] * radius[i];
	printf("%.10llf\n",area * (long double) 3.1415926536);
	return 0;
}


#include <iostream>
#include <fstream>
#include <cstdio>
#include <climits>
#include <vector>
#include <map>
#include <list>
#include <deque>
#include <stack>
#include <set>
#include <string>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <cmath>

using namespace std;

bool myfunc(int a, int b)
{
	return a > b;
}

int main()
{
	int n;
	vector<int> radius(n, 0);
	cin >> n;
	double area = 0;
	for(int i = 0; i < n; i++)
		cin >> radius[i];
	sort(radius.begin(), radius.end(), myfunc);
	for(int i = 0; i < n; i++)
		if (i % 2 == 0)
			area += radius[i] * radius[i];
		else
			area -= radius[i] * radius[i];
//	printf("%.10lf\n",area * (long double) 3.1415926536);
	cout << area * (double) 3.1415926536 << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int a[105],b,c,d,i,n;
double k,p;
main()
{
cin>>n;
p=3.141592653589793;
for(i=1;i<=n;i++)
cin>>a[i];
sort(a,a+n+1);
for(i=n;i>0;i=i-2)
k=k+p*(a[i]*a[i]-a[i-1]*a[i-1]);
cout<<k;
}


#include <iostream>
#include <fstream>
#include <cstdio>
#include <climits>
#include <vector>
#include <map>
#include <list>
#include <deque>
#include <stack>
#include <set>
#include <string>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <cmath>

using namespace std;

bool myfunc(int a, int b)
{
	return a > b;
}

int main()
{
	int n;
	vector<int> radius(n, 0);
	cin >> n;
	long double area = 0;
	for(int i = 0; i < n; i++)
		cin >> radius[i];
	sort(radius.begin(), radius.end(), myfunc);
	for(int i = 0; i < n; i++)
		if (i % 2 == 0)
			area += radius[i] * radius[i];
		else
			area -= radius[i] * radius[i];
//	printf("%.10lf\n",area * (long double) 3.1415926536);
	cout << area * (long double) 3.1415926536 << endl;
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
const long double PI = 3.141592;
int main()
{
int n,i,*m;
cin>>n;
m=new int[n];
for(i=0;i<n;i++)
cin>>m[i];
sort(m,m+n);
reverse(m,m+n);
long double j=0;
for(i=0;i<n;i+=2)
{if(n-i>2) j+=((double) (m[i]*m[i]*PI)-(m[i+1]*m[i+1]*PI));else j+=(double) m[i]*m[i]*PI;}
cout<<j<<endl;
return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
const long double PI = 3.141592;
int main()
{
int n,i,*m;
cin>>n;
m=new int[n];
for(i=0;i<n;i++)
cin>>m[i];
sort(m,m+n);
reverse(m,m+n);
long double j=0;
for(i=0;i<n;i+=2)
{if(n-i>1) j+=((double) (m[i]*m[i]*PI)-(m[i+1]*m[i+1]*PI));else j+=(double) m[i]*m[i]*PI;}
cout<<j<<endl;
return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
const long double PI = 3.141592;
int main()
{
int n,i,*m;
cin>>n;
m=new int[n];
for(i=0;i<n;i++)
cin>>m[i];
sort(m,m+n);
reverse(m,m+n);
long double j=0;
for(i=0;i<n;i+=2)
{if(n-i>2) j+=(double) m[i]*m[i]*PI-(m[i+1]*m[i+1]*PI);else j+=(double) m[i]*m[i]*PI;}
cout<<fixed<<setprecision(5)<<j<<endl;
return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
const long double PI = 3.141592;
int main()
{
int n,i,*m;
cin>>n;
m=new int[n];
for(i=0;i<n;i++)
cin>>m[i];
sort(m,m+n);
reverse(m,m+n);
long double j=0;
for(i=0;i<n;i+=2)
{if(n>1) j+=(double) m[i]*m[i]*PI-(m[i+1]*m[i+1]*PI);else j+=(double) m[i]*m[i]*PI;}
cout<<fixed<<setprecision(5)<<j<<endl;
return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
const long double PI = 3.141592;
int main()
{
int n,i,*m;
cin>>n;
m=new int[n];
for(i=0;i<n;i++)
cin>>m[i];
sort(m,m+n);
reverse(m,m+n);
long double j=0;
for(i=0;i<n;i+=2)
{if(n-i>2) j+=(double) m[i]*m[i]*PI-(m[i+1]*m[i+1]*PI);else j+=(double) m[i]*m[i]*PI;}
cout<<j<<endl;
return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
const long double PI = 3.141592;
int main()
{
int n,i,*m;
cin>>n;
m=new int[n];
for(i=0;i<n;i++)
cin>>m[i];
sort(m,m+n);
reverse(m,m+n);
long double j=0;
for(i=0;i<n;i+=2)
{if(n>1) j+=(double) m[i]*m[i]*PI-(m[i+1]*m[i+1]*PI);else j+=(double) m[i]*m[i]*PI;}
cout<<j<<endl;
return 0;
}


//Pham Huu Canh
//B. Trace
//Algorithm: Implementation + Sorting
//Complexity: O(n)
//AC: 30ms

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define max64 9223372036854775807LL
#define max32 2147483647
#define maxty 1001001001
#define max16 32767
#define EPS 1e-8
#define ll long long
#define ull unsigned long long
#define pb push_back
#define MP make_pair
#define PQ priority_queue
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define timmax(x, y)    ((x) > (y) ? (x) : (y))
#define timmin(x, y)    ((x) < (y) ? (x) : (y))
#define fori(i, n)      for((i) = 0; (i) < (n); (i)++)
#define ford(i, n)      for((i) = (n-1); (i) >= 0; (i)--)
#define repi(i, a, b)   for((i) = (a); (i) <= (b); (i)++)
#define repd(i, a, b)   for((i) = (a); (i) >= (b); (i)--)
#define all(tmpv)      tmpv.begin(), tmpv.end()

#define fii "b.inp"
#define foo "b.out"
#define PI acos(-1)

using namespace std;

typedef pair<int, int> II;
typedef vector<int> VI;

void input()
{
    int i, n, tong;
    int r[105];

    scanf("%d", &n);
    fori(i, n)  scanf("%d", &r[i]);

    sort(r, r + n, greater<int>());
    tong = 0;
    fori(i, n){
        if (i&1)    tong -= r[i] * r[i];
        else    tong += r[i] * r[i];
    }
    double res = tong * PI;
    printf("%.5lf", res);
}

int main()
{
    //freopen(fii,"r",stdin);
    //freopen(foo,"w",stdout);

    input();

    return 0;
}


//Pham Huu Canh
//B. Trace
//Algorithm: Implementation + Sorting
//Complexity: O(n)
//AC: 30ms

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define max64 9223372036854775807LL
#define max32 2147483647
#define maxty 1001001001
#define max16 32767
#define EPS 1e-8
#define ll long long
#define ull unsigned long long
#define pb push_back
#define MP make_pair
#define PQ priority_queue
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define timmax(x, y)    ((x) > (y) ? (x) : (y))
#define timmin(x, y)    ((x) < (y) ? (x) : (y))
#define fori(i, n)      for((i) = 0; (i) < (n); (i)++)
#define ford(i, n)      for((i) = (n-1); (i) >= 0; (i)--)
#define repi(i, a, b)   for((i) = (a); (i) <= (b); (i)++)
#define repd(i, a, b)   for((i) = (a); (i) >= (b); (i)--)
#define all(tmpv)      tmpv.begin(), tmpv.end()

#define fii "b.inp"
#define foo "b.out"
#define PI acos(-1)

using namespace std;

typedef pair<int, int> II;
typedef vector<int> VI;

void input()
{
    int i, n, tong;
    int r[105];

    scanf("%d", &n);
    fori(i, n)  scanf("%d", &r[i]);

    sort(r, r + n, greater<int>());
    tong = 0;
    fori(i, n){
        if (i&1)    tong -= r[i] * r[i];
        else    tong += r[i] * r[i];
    }
    double res = tong * PI;
    printf("%.3lf", res);
}

int main()
{
 //   freopen(fii,"r",stdin);
 //   freopen(foo,"w",stdout);

    input();

    return 0;
}


//Pham Huu Canh
//B. Trace
//Algorithm: Implementation + Sorting
//Complexity: O(n)
//AC: 30ms

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define max64 9223372036854775807LL
#define max32 2147483647
#define maxty 1001001001
#define max16 32767
#define EPS 1e-8
#define ll long long
#define ull unsigned long long
#define pb push_back
#define MP make_pair
#define PQ priority_queue
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define timmax(x, y)    ((x) > (y) ? (x) : (y))
#define timmin(x, y)    ((x) < (y) ? (x) : (y))
#define fori(i, n)      for((i) = 0; (i) < (n); (i)++)
#define ford(i, n)      for((i) = (n-1); (i) >= 0; (i)--)
#define repi(i, a, b)   for((i) = (a); (i) <= (b); (i)++)
#define repd(i, a, b)   for((i) = (a); (i) >= (b); (i)--)
#define all(tmpv)      tmpv.begin(), tmpv.end()

#define fii "b.inp"
#define foo "b.out"
#define PI acos(-1)

using namespace std;

typedef pair<int, int> II;
typedef vector<int> VI;

void input()
{
    int i, n, tong;
    int r[105];

    scanf("%d", &n);
    fori(i, n)  scanf("%d", &r[i]);

    sort(r, r + n, greater<int>());
    tong = 0;
    fori(i, n){
        if (i&1)    tong -= r[i] * r[i];
        else    tong += r[i] * r[i];
    }
    double res = tong * PI;
    printf("%.4lf", res);
}

int main()
{
    freopen(fii,"r",stdin);
    freopen(foo,"w",stdout);

    input();

    return 0;
}


//Pham Huu Canh
//B. Trace
//Algorithm:
//Complexity:
//AC:

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define max64 9223372036854775807LL
#define max32 2147483647
#define maxty 1001001001
#define max16 32767
#define EPS 1e-8
#define ll long long
#define ull unsigned long long
#define pb push_back
#define MP make_pair
#define PQ priority_queue
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define timmax(x, y)    ((x) > (y) ? (x) : (y))
#define timmin(x, y)    ((x) < (y) ? (x) : (y))
#define fori(i, n)      for((i) = 0; (i) < (n); (i)++)
#define ford(i, n)      for((i) = (n-1); (i) >= 0; (i)--)
#define repi(i, a, b)   for((i) = (a); (i) <= (b); (i)++)
#define repd(i, a, b)   for((i) = (a); (i) >= (b); (i)--)
#define all(tmpv)      tmpv.begin(), tmpv.end()

#define fii "b.inp"
#define foo "b.out"
#define PI acos(-1)

using namespace std;

typedef pair<int, int> II;
typedef vector<int> VI;

void input()
{
    int i, n, tong;
    int r[105];

    scanf("%d", &n);
    fori(i, n)  scanf("%d", &r[i]);

    sort(r, r + n, greater<int>());
    tong = 0;
    fori(i, n){
        if (i&1)    tong -= r[i] * r[i];
        else    tong += r[i] * r[i];
    }
    double res = tong * PI;
    printf("%.10lf", res);
}

int main()
{
  //  freopen(fii,"r",stdin);
  //  freopen(foo,"w",stdout);

    input();

    return 0;
}


//Pham Huu Canh
//B. Trace
//Algorithm: Implementation + Sorting
//Complexity: O(n)
//AC: 30ms

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define max64 9223372036854775807LL
#define max32 2147483647
#define maxty 1001001001
#define max16 32767
#define EPS 1e-8
#define ll long long
#define ull unsigned long long
#define pb push_back
#define MP make_pair
#define PQ priority_queue
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define timmax(x, y)    ((x) > (y) ? (x) : (y))
#define timmin(x, y)    ((x) < (y) ? (x) : (y))
#define fori(i, n)      for((i) = 0; (i) < (n); (i)++)
#define ford(i, n)      for((i) = (n-1); (i) >= 0; (i)--)
#define repi(i, a, b)   for((i) = (a); (i) <= (b); (i)++)
#define repd(i, a, b)   for((i) = (a); (i) >= (b); (i)--)
#define all(tmpv)      tmpv.begin(), tmpv.end()

#define fii "b.inp"
#define foo "b.out"
#define PI acos(-1)

using namespace std;

typedef pair<int, int> II;
typedef vector<int> VI;

void input()
{
    int i, n, tong;
    int r[105];

    scanf("%d", &n);
    fori(i, n)  scanf("%d", &r[i]);

    sort(r, r + n, greater<int>());
    tong = 0;
    fori(i, n){
        if (i&1)    tong -= r[i] * r[i];
        else    tong += r[i] * r[i];
    }
    double res = tong * PI;
    printf("%.4lf", res);
}

int main()
{
    //freopen(fii,"r",stdin);
    //freopen(foo,"w",stdout);

    input();

    return 0;
}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    long double n;
    cin>>n;
    long double *a = new long double[(int)n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[int(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    for(long double i = n-1;i>=0;i--)
    {
        area += pow((-1),n-i-1)*(a[(int)i])*(a[(int)i]);
    }
    area = area * pie;
    cout<<area<<endl;
    return 0;
}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long *a = new long [n];
    bool *b = new bool[1001];
    for(int i = 0;i<1000;i++)
    b[i] = false;

    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area<<endl;

}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    long double n;
    cin>>n;
    long double *a = new long double[(int)n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[int(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area<<endl;
    return 0;
}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long long *a = new long long[n];
    bool *b = new bool[1001];
    for(int i = 0;i<1001;i++)
    b[i] = false;

    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1001;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long long int area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        //cout<<"area is "<<area<<endl;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        //cout<<"area is "<<area<<endl;
        }

    }
//  cout<<area<<endl;
   long double area2 = (long double)area * pie;
    cout<<area2<<endl;

}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    long double n;
    cin>>n;
    long double *a = new long double[(int)n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[int(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    for(long double i = n-1;i>=0;i--)
    {
        area += pow((-1),n-i-1)*pow(a[(int)i],2);
    }
    area = area* pie;
    cout<<area<<endl;
    return 0;
}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long *a = new long [n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area;

}#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long *a = new long [n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area;

}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long *a = new long [n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area<<endl;

}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    long double n;
    cin>>n;
    long double *a = new long double[(int)n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[int(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area;

}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long long *a = new long long[n];
    bool *b = new bool[1001];
    for(int i = 0;i<1000;i++)
    b[i] = false;

    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
    area = area * pie;
    cout<<area<<endl;

}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    long double n;
    cin>>n;
    long double *a = new long double[(int)n];
    bool *b = new bool[1000];
    b[0] = false;
    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[int(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long double area = 0;
    for(long double i = n-1;i>=0;i--)
    {
        area += pow((-1),(int)(n-i-1))*(a[(int)i])*(a[(int)i]);
    }
    area = area * pie;
    cout<<area<<endl;
    return 0;
}


#include <iostream>
#include<math.h>
using namespace std;

int main() {
    long double pie = 3.1415926536;
    int n;
    cin>>n;
    long long *a = new long long[n];
    bool *b = new bool[1001];
    for(int i = 0;i<1000;i++)
    b[i] = false;

    for(int i = 0;i<n;i++)
    {
        cin>>a[i];
        b[(a[i])] = true;
    }

    int c = 0;
    for(int i = 0;i<1000;i++)
    {
        if(b[i])
        {a[c++] = i;}
    }
    long long area = 0;
    int d = 0;
    for(int i = n-1;i>=0;i--)
    {
        if(d%2 == 0)
        {area += (a[i])*(a[i]);
        d++;
        }else
        {
        area += (-1)*(a[i])*(a[i]);
        d++;
        }

    }
   long double area2 = area * pie;
    cout<<area2<<endl;

}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <cstring>
#include <string>
#include <cmath>
using namespace std;

int main()
{int n;
int  b[120]={0},a[35]={0},y,f;
const double pi=3.14159265358979323846;
double x=0;
//freopen("i.txt","r",stdin);

cin>>n;
for(int i=0; i<n; i++) cin>>b[i];
sort(b,b+n);

if(n%2==0)f=0; else f=1;
if (n>=2)
{for(int i=0; i<n-f-1;i+=2)
{double x1=b[i],x2=b[i+1];
    x+=pi*(x1*x1-x2*x2);
}
}
if(f==1) { double x1=b[n-1]; x+=pi*(x1*x1);}

cout.precision(10);

cout<<fabs(x);
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <cstring>
#include <string>
using namespace std;

int main()
{int n;
int  b[120]={0},a[35]={0},y,f;
double x,pi=3.14159265358979323846;
//freopen("i.txt","r",stdin);

cin>>n;
for(int i=0; i<n; i++)
cin>>b[i];
sort(b,b+n);
if(n%2==0)f=0; else f=1;
for(int i=0; i<n-f-1;i+=2)
{double x1=b[i],x2=b[i+1];
    x+=pi*(x1*x1-x2*x2);
}
if(f==1) { double x1=b[n-1]; x+=pi*(x1*x1);}

cout.precision(17);

cout<<x;
    return 0;
}


#include <iostream>
using namespace std;

#define MAX 1001

int rows[MAX], cols[MAX], mat[MAX][MAX];
int n, m, k;

int main() {
	cin >> n >> m >> k;
	for(int i = 1; i <= n; i++)
		for(int j = 1; j <= m; j++)
			cin >> mat[i][j];
	for(int i = 1; i <= m; i++)
		cols[i] = i;
	for(int j = 1; j <= n; j++)
		rows[j] = j;

	while(k-->0) {
		char q; cin >> q;
		int x, y; cin >> x >> y;
		switch(q) {
			case 'c':
				swap(cols[x], cols[y]);
				break;
			case 'r':
				swap(rows[x], rows[y]);
				break;
			case 'g':
				cout << mat[rows[x]][cols[y]] << endl;
		}
	}
}


/*
 * main.cpp
 *
 *  Created on: 10 сент. 2012
 *      Author: alexey
 */
#include <iostream>
#include <vector>
using namespace std;
int data[1007][1007];

int col[1007], row[1007];

int main()
{
    for(int i = 0;i<1007;i++)
    {
        col[i] = i;
        row[i] = i;
    }
    int n,m,k;
    cin>>n>>m>>k;
    for(int i = 0;i<n;i++)
        for(int j = 0;j<m;j++)
            cin>>data[i][j];
    for(int i = 0;i<k;i++)
    {
        char c;int a,b;
        cin>>c>>a>>b;
        a--,b--;
        if(c=='c')
        {
            int temp = col[a];
            col [a] = col[b];
            col [b] = temp;
        }

        if(c=='r')
        {
            int temp = row[a];
            row[a] = row[b];
            row[b] = temp;
        }

        if(c=='g')
            cout<<data[row[a]][col[b]]<<endl;
    }
    return 0;
}


#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iomanip>
#include <limits.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define rep(i,  n) for(ll i = 0; i < n; i++)
#define F first
#define S second
#define pii pair<int,  int>
#define oj I64d
typedef long long ll;
ll max(ll x, ll y){return x>y?x:y;} ll min(ll x, ll y){return x<y?x:y;}
using namespace std;

//              (O)
//             <M
//  o          <M
// /| ......  /:M\------------------------------------------------, , , , , ,
// (O)[]Koorosh[]I:K+}=====<{H}>================================------------>
// \| ^^^^^^  \:W/------------------------------------------------''''''
//  o          <W
//             <W
//              (O)
//

const ll N = 1e5 + 9;

int n, m, k, x, y, a[1020][1020], r[1020], c[1020];
char o;

// Let it go! Let it go! Can't hold it back anymore! Let it go! Let it go! Turn away and slam the door!

int main()
{
    cin>>n>>m>>k;
    rep(i, n)
        rep(j, m)
            cin >> a[i][j];
    rep(i, n)
        r[i] = i;
    rep(i, m)
        c[i] = i;
    rep(i, k)
    {
        cin >> o >> x >> y;
        if(o == 'r')
            swap(r[x], r[y]);
        else if(o == 'c')
            swap(c[x], c[y]);
        else
            cout<<a[r[x]][c[y]]<<endl;
    }
}

// Turn away and slam the door!


#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iomanip>
#include <limits.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define rep(i, n) for(ll i = 0; i < n; i++)
#define F first
#define S second
#define pii pair<int,  int>
#define oj I64d
typedef long long ll;
ll max(ll x, ll y){return x>y?x:y;} ll min(ll x, ll y){return x<y?x:y;}
using namespace std;

//              (O)
//             <M
//  o          <M
// /| ......  /:M\------------------------------------------------, , , , , ,
// (O)[]Koorosh[]I:K+}=====<{H}>================================------------>
// \| ^^^^^^  \:W/------------------------------------------------''''''
//  o          <W
//             <W
//              (O)
//

const ll N = 1e3 + 9;

int n, m, k, x, y, a[N][N], r[N], c[N];
char o;

// Let it go! Let it go! Can't hold it back anymore! Let it go! Let it go! Turn away and slam the door!

int main()
{_
    cin >> n >> m >> k;
    rep(i, n)
        rep(j, m)
            cin >> a[i][j];
    rep(i, n)
        r[i] = i;
    rep(i, m)
        c[i] = i;

    rep(i, k)
    {
        cin >> o >> x >> y;
        x--; y--;
        if(o == 'r')
            swap(r[x], r[y]);
        else if(o == 'c')
            swap(c[x], c[y]);
        else
            cout << a[r[x]][c[y]] << endl;
    }
}

// Turn away and slam the door!


#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iomanip>
#include <limits.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define rep(i, n) for(ll i = 0; i < n; i++)
#define F first
#define S second
#define pii pair<int,  int>
#define oj I64d
typedef long long ll;
ll max(ll x, ll y){return x>y?x:y;} ll min(ll x, ll y){return x<y?x:y;}
using namespace std;

//              (O)
//             <M
//  o          <M
// /| ......  /:M\------------------------------------------------, , , , , ,
// (O)[]Koorosh[]I:K+}=====<{H}>================================------------>
// \| ^^^^^^  \:W/------------------------------------------------''''''
//  o          <W
//             <W
//              (O)
//

const ll N = 1e3 + 9;

int n, m, k, x, y, a[N][N], r[N], c[N];
char o;

// Let it go! Let it go! Can't hold it back anymore! Let it go! Let it go! Turn away and slam the door!

int main()
{
    cin >> n >> m >> k;
    rep(i, n)
        rep(j, m)
            cin >> a[i][j];
    rep(i, n)
        r[i] = i;
    rep(i, m)
        c[i] = i;

    rep(i, k)
    {
        cin >> o >> x >> y;
        x--; y--;
        if(o == 'r')
            swap(r[x], r[y]);
        else if(o == 'c')
            swap(c[x], c[y]);
        else
            cout << a[r[x]][c[y]] << endl;
    }
}

// Turn away and slam the door!


/*-------------dago96's template v1.1 BETA-------------*/

//input output
#include <iostream>
#include <cstdio>
#include <fstream>
#include <istream>
#include <ostream>
//data structure
#include <string>
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <bitset>
#include <stack>
#include <queue>
#include <deque>
#include <set>
//miscellaneous
#include <cstdlib>
#include <cmath>
#include <complex>
#include <algorithm>
#include <iomanip>
#include <cstddef>
#include <cctype>
#include <utility>

#define Ical using
#define emang namespace
#define ganteng std
#define pb push_back
#define pob pop_back
#define Fs first
#define Sc second
#define mp make_pair
#define mean(a,b) double(a+b)/2
#define meanint(a,b) (a+b)/2
#define REPS(i,a) for(int i=0;i<a;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define REPD(i,a,b) for(int i=a;i>=b;i--)
#define REPB(i,a,b) for(int i=a;i<b;i++)
#define GC getchar
#define NL puts("")

Ical emang ganteng;
typedef double db;
typedef long long ll;
typedef pair <int,int> ii;
typedef pair <string,int> si;
typedef vector <ii> vii;
typedef vector <int> vi;
typedef vector <char> vc;
typedef vi::iterator it;

template<typename t>
inline t getnum() {
	t res=0;
	char c;
	int sign=1;
	while( (c=GC())==' ' || c=='\n' )
	{
		c=GC();
		if ( c==' ' || c=='\n' ) continue;
		else break;
	}
	if (c=='+') {}
	else if (c=='-') sign=-1;
	else res=c-'0';
	while (1)
	{
		c=GC();
		if (c>='0'&&c<='9') res=res*10+c-'0';
		else break;
	}
	return res*sign;
}

inline string getstr() {
	string str; char k;
	while((k=GC())!=' ' &&k!='\n' && k!='\t'
		&& k!='\v' && k!='\0' && k!=EOF)
		str.pb(k);
	return str;
}

inline void _open() { freopen("d.in","r",stdin); }

/*-------------end of template-------------*/
int dbase[1005][1005],
	col[1005],row[1005];

int main() {
	//_open();
	int n,m,k; cin>>n>>m>>k;
	REPS(i,n) {
		row[i]=i;
		REPS(j,m) {
			cin>>dbase[i][j];
			col[j]=j;
		}
	} GC();
	REPS(i,k) {
		char kar=GC();
		int a=getnum<int>(),b=getnum<int>();
		switch (kar) {
		case 'c':swap(col[a-1],col[b-1]); break;
		case 'r':swap(row[a-1],row[b-1]); break;
		case 'g':cout<<dbase[row[a-1]][col[b-1]]<<'\n'; break;
		}
	}
	return 0;
}


#include<stdio.h>

int main()
{
    int cells[100][100];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          c=getchar();
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          c=getchar();
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          scanf("%c",&c);
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[100][100];
    int n,m,i,j,in1,in2;
    char c;
    int k,l;

    scanf("%d%d%d",&n,&m,&k);
    for(i=1;i<=n;i++)
          for(j=1;j<=m;j++)

               scanf("%d",&cells[i][j]);

    getchar();
    while(k--){

          scanf("%c %d %d",&c,&in1,&in2);
          getchar();
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[100][100];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          c=getchar();
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    getchar();
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[100][100];
    int n,m,i,j,in1,in2;
    char c;
    int k,l;

    scanf("%d %d",&n,&m);
    scanf("%d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          scanf("%c",&c);
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    int k,l;

    scanf("%d%d%d",&n,&m,&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          scanf("%c%d%d",&c,&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[100][100];
    int n,m,i,j,in1,in2;
    char c;
    int k,l,temp;

    scanf("%d%d%d",&n,&m,&k);
    for(i=1;i<=n;i++)
          for(j=1;j<=m;j++)

               scanf("%d",&cells[i][j]);

    getchar();
    while(k--){

          scanf("%c %d %d",&c,&in1,&in2);
          getchar();
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              /*cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              */
                              temp=cells[in1][j];
                              cells[in1][j]=cells[in2][j];
                              cells[in2][j]=temp;

                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              /*cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              */
                              temp=cells[i][in1];
                              cells[i][in1]=cells[i][in2];
                              cells[i][in2]=temp;
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          scanf("%c",&c);
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("\n%d",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    int k,l;

    scanf("%d %d",&n,&m);
    scanf("%d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          scanf("%c",&c);
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          c=getchar();
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d",cells[in1][in2]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[100][100];
    int r[100],c[100];
    int n,m,i,j,in1,in2;
    char ch;
    int k,l,temp;

    scanf("%d%d%d",&n,&m,&k);
    for(i=1;i<=n;i++)
          for(j=1;j<=m;j++)

               scanf("%d",&cells[i][j]);

    getchar();

    for(i=1;i<=n;i++)
                     r[i]=i;
    for(i=1;i<=m;i++)
                     c[i]=i;
    while(k--){

          scanf("%c %d %d",&ch,&in1,&in2);
          getchar();
          switch(ch){

                    case 'r':

                         r[in1]=r[in1]^r[in2];
                         r[in2]=r[in1]^r[in2];
                         r[in1]=r[in1]^r[in2];

                         break;

                    case 'c':

                         c[in1]=c[in1]^c[in2];
                         c[in2]=c[in1]^c[in2];
                         c[in1]=c[in1]^c[in2];

                         break;
                    case 'g':
                         printf("%d\n",cells[r[in1]][c[in2]]);

          }
    }
    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int n,m,i,j,in1,in2;
    char c;
    long long k,l;

    scanf("%d %d",&n,&m);
    scanf("%I64d",&k);

    for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){

               scanf("%d",&cells[i][j]);
          }
    }

    for(l=1;l<=k;l++){

          fflush(stdin);
          c=getchar();
          scanf("%d %d",&in1,&in2);
          switch(c){

                    case 'r':
                         for(j=1;j<=m;j++)
                         {
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in2][j]=cells[in1][j] ^ cells[in2][j];
                              cells[in1][j]=cells[in1][j] ^ cells[in2][j];
                         }
                         break;
                    case 'c':
                         for(i=1;i<=n;i++)
                         {
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in2]=cells[i][in1] ^ cells[i][in2];
                              cells[i][in1]=cells[i][in1] ^ cells[i][in2];
                         }
                         break;
                    case 'g':
                         printf("%d\n",cells[in1][in2]);

          }
    }

    return 0;
}


#include<stdio.h>

int main()
{
    int cells[1001][1001];
    int r[1001],c[1001];
    int n,m,i,j,in1,in2;
    char ch;
    long long k;

    scanf("%d%d%I64d",&n,&m,&k);
    for(i=1;i<=n;i++)
          for(j=1;j<=m;j++)

               scanf("%d",&cells[i][j]);

    getchar();

    for(i=1;i<=n;i++)
                     r[i]=i;
    for(i=1;i<=m;i++)
                     c[i]=i;
    while(k--){

          scanf("%c %d %d",&ch,&in1,&in2);
          getchar();
          switch(ch){

                    case 'r':

                         r[in1]=r[in1]^r[in2];
                         r[in2]=r[in1]^r[in2];
                         r[in1]=r[in1]^r[in2];

                         break;

                    case 'c':

                         c[in1]=c[in1]^c[in2];
                         c[in2]=c[in1]^c[in2];
                         c[in1]=c[in1]^c[in2];

                         break;
                    case 'g':
                         printf("%d\n",cells[r[in1]][c[in2]]);

          }
    }
    return 0;
}


//
//  codeforces2.c
//
//
//  Created by suyash taneja on 9/10/12.
//  Copyright 2012 Iit. All rights reserved.
//

#include <stdio.h>
int main(){
    int n,m,k,i,j,array[1000][1000],row[1000],column[1000],x,y,temp,a=0;
    char op;
    scanf("%d %d %d",&n,&m,&k);
    for(i=0;i<n;i++){
        for(j=0;j<m;j++){
            scanf("%d",&array[i][j]);
        }
    }
    for(i=0;i<n;i++){
        row[i]=i;
    }
    for(i=0;i<m;i++){
        column[i]=i;
    }
    for(j=0;j<k*2;j++){
        scanf("%c",&op);
        scanf("%d %d",&x,&y);

        if(op=='c'){
            //printf("c");
            temp=column[x-1];
            column[x-1]=column[y-1];
            column[y-1]=temp;
        }
        else if(op=='r'){
            //printf("r");
            temp=row[x-1];
            row[x-1]=row[y-1];
            row[y-1]=temp;
        }
        if(op=='g'){
            //printf("g");
            printf("%d\n",array[row[x-1]][column[y-1]]);

        }
    }
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main(void) {
    //freopen("Text.txt", "r", stdin);
    int n, m, k, x, y;
    scanf("%d %d %d", &n, &m, &k);
    int ad[2000][2000], i, j;
    int rows[2000], cols[2000];
    for (i = 0; i < n; i++) {
        for (j = 0; j < m; j++) {
            scanf("%d", &ad[i][j]);
        }
    }
    for (i = 0; i < n; i++) {
        rows[i] = i;
    }
    for (j = 0; j < m; j++) {
        cols[j] = j;
    }
    char q;
    for (i = 0; i < k; i++) {
        scanf("%s %d %d", &q, &x, &y);
        if (q == 'g') {
            printf("%d\n", ad[rows[x - 1]][cols[y - 1]]);
        } else if (q == 'r') {
            int temp = rows[x - 1];
            rows[x - 1] = rows[y - 1];
            rows[y - 1] = temp;
        } else if (q == 'c') {
            int temp = cols[x - 1];
            cols[x - 1] = cols[y - 1];
            cols[y - 1] = temp;
        }
    }
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    //READF("Text.txt");
    int n, m, k, x, y;
    scanf("%d %d %d", &n, &m, &k);
    int ad[1001][1001], i, j;
    int rows[1001], cols[1001];
    for (i = 0; i < n; i++) {
        for (j = 0; j < m; j++) {
            scanf("%d", &ad[i][j]);
        }
    }
    for (i = 0; i < n; i++) {
        rows[i] = i;
    }
    for (j = 0; j < m; j++) {
        cols[j] = j;
    }
    char q;
    for (i = 0; i < k; i++) {
        scanf("%c %d %d", &q, &x, &y);
        if (q == 'g') {
            printf("%d\n", ad[rows[x - 1]][cols[y - 1]]);
        } else if (q == 'r') {
            int temp = rows[x - 1];
            rows[x - 1] = rows[y - 1];
            rows[y - 1] = temp;
        } else if (q == 'c') {
            int temp = cols[x - 1];
            cols[x - 1] = cols[y - 1];
            cols[y - 1] = temp;
        }
    }
}


#include <stdio.h>

enum {
      MAXN = 1010
};

int a[MAXN][MAXN], n, m;
int actualRow[MAXN], actualColumn[MAXN];

void swap(int *a, int *b) {
      int c = *a;
      *a = *b;
      *b = c;
}

int main() {
      int k, i, j, q;
      scanf("%d %d %d", &n, &m, &k);
      for(i = 0; i < n; i++)
            for(j = 0; j < m; j++)
                  scanf("%d", &a[i][j]);
      for(i = 0; i < n; i++)
            actualRow[i] = i;
      for(i = 0; i < m; i++)
            actualColumn[i] = i;
      for(q = 0; q < k; q++) {
            char cmd;
            int x, y;
            scanf(" %c %d %d", &cmd, &x, &y);
            x--, y--;
            if(cmd == 'c') {
                  swap(&actualColumn[x], &actualColumn[y]);
            } else if(cmd == 'r') {
                  swap(&actualRow[x], &actualRow[y]);
            } else {
                  printf("%d\n", a[actualRow[x]][actualColumn[y]]);
            }
      }
      return 0;
}


#include <stdio.h>

enum {
      MAXN = 1010
};

int a[MAXN][MAXN], n, m;
int buf[MAXN];

void swapColumns(int x, int y) {
      int i;
      for(i = 0; i < n; i++) {
            buf[i] = a[i][x];
            a[i][x] = a[i][y];
      }
      for(i = 0; i < n; i++)
            a[i][y] = buf[i];
}

void swapRows(int x, int y) {
      int i;
      for(i = 0; i < m; i++) {
            buf[i] = a[x][i];
            a[x][i] = a[y][i];
      }
      for(i = 0; i < m; i++)
            a[y][i] = buf[i];
}

int main() {
      int k, i, j, q;
      scanf("%d %d %d", &n, &m, &k);
      for(i = 0; i < n; i++)
            for(j = 0; j < m; j++)
                  scanf("%d", &a[i][j]);
      for(q = 0; q < k; q++) {
            char cmd;
            int x, y;
            scanf(" %c %d %d", &cmd, &x, &y);
            x--, y--;
            if(cmd == 'c') {
                  swapColumns(x, y);
            } else if(cmd == 'r') {
                  swapRows(x, y);
            } else {
                  printf("%d\n", a[x][y]);
            }
      }
      return 0;
}


#include <stdio.h>

int main()
{
	int n, m, k, i, j,max;
	char ch;
	int x, y,temp;
	int r[1005] = { 0 };
	int c[1005] = { 0 };
	int **a = malloc(sizeof(int)*1005);
	for (i = 0; i < 1000; i++)
		a[i] = malloc(sizeof(int) * 1005);
	scanf("%d %d %d", &n, &m, &k);
	max = n > m ? n : m;
	for (i = 1; i <= max; i++) r[i] = i;
	for (i = 1; i <= max; i++) c[i] = i;
	for (i = 1; i <= n; i++)
		for (j = 1; j <= m; j++)
			scanf("%d", &a[i][j]);
	getchar();
	for (i = 1; i <= k; i++)
	{
		scanf("%c %d %d", &ch, &x, &y);
		getchar();
		if (ch == 'g')
		{
			printf("%d\n", a[c[x]][r[y]]);
		}
		else if (ch == 'c')
		{
			temp = r[x];
			r[x] = r[y];
			r[y] = temp;
		}
		else if (ch == 'r')
		{
			temp = c[x];
			c[x] = c[y];
			c[y] = temp;
		}
	}
	return 0;
}


#include <stdio.h>

int main()
{
	int n, m, k, i, j,max;
	char ch;
	int x, y,temp;
	int r[1005] = { 0 };
	int c[1005] = { 0 };
	int **a = malloc(sizeof(int)*1005);
	for (i = 1; i <= 1005; i++)
		a[i] = malloc(sizeof(int) * 1005);
	scanf("%d %d %d", &n, &m, &k);
	max = n > m ? n : m;
	for (i = 1; i <= max; i++) r[i] = i;
	for (i = 1; i <= max; i++) c[i] = i;
	for (i = 1; i <= n; i++)
		for (j = 1; j <= m; j++)
			scanf("%d", &a[i][j]);
	getchar();
	for (i = 1; i <= k; i++)
	{
		scanf("%c %d %d", &ch, &x, &y);
		getchar();
		if (ch == 'g')
		{
			printf("%d\n", a[c[x]][r[y]]);
		}
		else if (ch == 'c')
		{
			temp = r[x];
			r[x] = r[y];
			r[y] = temp;
		}
		else if (ch == 'r')
		{
			temp = c[x];
			c[x] = c[y];
			c[y] = temp;
		}
	}
	return 0;
}


#include <stdio.h>

int main()
{
	int n, m, k, i, j;
	char ch;
	int x, y,temp;
	int ax[1005] = { 0 };
	int by[1005] = { 0 };
	int **a = malloc(sizeof(int)*1005);
	for (i = 0; i < 1000; i++)
		a[i] = malloc(sizeof(int) * 1005);
	scanf("%d %d %d", &n, &m, &k);
	for (i = 1; i <= n; i++) ax[i] = i;
	for (i = 1; i <= m; i++) by[i] = i;
	for (i = 1; i <= n; i++)
		for (j = 1; j <= m; j++)
			scanf("%d", &a[i][j]);
	getchar();
	for (i = 1; i <= k; i++)
	{
		scanf("%c %d %d", &ch, &x, &y);
		getchar();
		if (ch == 'g')
		{
			printf("%d\n", a[ax[x]][by[y]]);
		}
		else if (ch == 'c')
		{
			temp = ax[x];
			ax[x] = ax[y];
			ax[y] = temp;
		}
		else if (ch == 'r')
		{
			temp = by[x];
			by[x] = by[y];
			by[y] = temp;
		}
	}
	return 0;
}


#include <stdio.h>
short int x[1001][1001];
   short int n,m,k,o,p,q;
      short int i,j;
      char z;
short int abc,abd;

  int main(){
scanf("%d %d %d",&n,&m,&k);
      for(i=1;i<=n;i++){
          for(j=1;j<=m;j++){
              scanf("%d",&x[i][j]);
                        }
        scanf("\n");
      }
      for(j=0;j<k;j++){
          scanf("%c %d %d\n",&z,&o,&p);
          if(z == 'g'){
              printf("%d\n",x[o][p]);
          }else if(z == 'r'){
              for(i=1;i<=m;i++){
                 abc = x[o][i];
                 x[o][i] = x[p][i];
                 x[p][i] = abc;
              }
          }
          else{
              for(i=1;i<=n;i++){
                  abd = x[i][o];
                  x[i][o] = x[i][p];
                  x[i][p] = abd;
              }
          }
      }
      return 0;
      }


#include <stdio.h>

int main() {
	int ilin[1024], icol[1024];
	int lin, col;
	long int req;
	long int mapa[1024][1024];
	char s[2]; int x, y;
	int tmp, i, j;

	while (scanf("%d %d %ld ", &lin, &col, &req) != EOF) {

		for (i = 0; i < lin; i++) {
			ilin[i] = i;
			for (j = 0; j < col; j++) {
				icol[j] = j;
				scanf("%ld ", &mapa[i][j]);
			}
		}

		while (req--) {
			scanf("%s %d %d ", s, &x, &y);
			x--; y--;
			switch (s[0]) {
			case 'c':
				tmp = icol[x];
				icol[x] = icol[y];
				icol[y] = tmp;
				break;
			case 'r':
				tmp = ilin[x];
				ilin[x] = ilin[y];
				ilin[y] = tmp;
				break;
			case 'g':
				printf("%ld\n", mapa[ilin[x]][icol[y]]);
				break;
			}
		}
	}

	return 0;
}


#include<stdio.h>
#include<math.h>
int main(){
  int n , m,k,j,i;
  scanf("%d %d %d",&n,&m,&k);
  int a[n][m] , raw[n],col[m];
  for(i=0;i<n;i++){
     raw[i] = i+1;
  }
  for(i=0;i<m;i++){
    col[i] = i+1;
  }
  for(i=0;i<n;i++){
    for(j=0;j<m;j++){
        scanf("%d",&a[i][j]);
    }
  }
  char c;
  int x,y,temp;
  getchar();
  for(i=0;i<k;i++){
    c = getchar();
    scanf("%d %d",&x,&y);
    getchar();
       if(c == 'c'){
        temp = col[y-1];
        col[y-1] = col[x-1];
        col[x-1] = temp;
    }
    else if(c == 'r'){
        temp = raw[y-1];
        raw[y-1] = raw[x-1];
        raw[x-1] = temp;
    }
    else {
        printf("%d\n",a[raw[x-1]-1][col[y-1]-1]);
    }
  }
 return 0;
}