#include <iostream>
#include <algorithm>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(){
double ang, s, sq, r2, res, M[500];
int n, r, pts;
while(cin >> n >> r, n + r != 0){
for(int i = 0; i < n; i++){
cin >> M[i];
M[i] = M[i] * M_PI / 180;
}
sort(M, M + n);
res = M_PI * r * r * n * (n - 1) * (n - 2) / 6;
r2 = r * r / 2.0;
sq = M_PI * r * r;
for(int i = 0; i < n; i++){
for(int j = i + 1; j < n; j++){
ang = M[j] - M[i];
if(ang < M_PI){
s = r2 * (ang - sin(ang));
}else{
ang = 2 * M_PI - ang;
s = sq - r2 * (ang - sin(ang));
}
pts = n - (j - i + 1);
res = res - s * pts;
pts = n - 2 - pts;
res = res - (sq - s) * pts;
}
}
printf("%.f\n", res);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8bWF0aC5oPgojaW5jbHVkZSA8c3RkaW8uaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCl7Cglkb3VibGUgYW5nLCBzLCBzcSwgcjIsIHJlcywgTVs1MDBdOwoJaW50IG4sIHIsIHB0czsKCXdoaWxlKGNpbiA+PiBuID4+IHIsIG4gKyByICE9IDApewoJCWZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspewogICAgICAgICAgICAgICAgY2luID4+IE1baV07CiAgICAgICAgICAgICAgICBNW2ldID0gTVtpXSAqIE1fUEkgLyAxODA7CgkJfQoJCXNvcnQoTSwgTSArIG4pOwoJCXJlcyA9IE1fUEkgKiByICogciAqIG4gKiAobiAtIDEpICogKG4gLSAyKSAvIDY7CgkJcjIgPSByICogciAvIDIuMDsKCQlzcSA9IE1fUEkgKiByICogcjsKCQlmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKCQkJZm9yKGludCBqID0gaSArIDE7IGogPCBuOyBqKyspewoJCQkJYW5nID0gTVtqXSAtIE1baV07CgkJCQlpZihhbmc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