#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
double a, sum = 0;
double period = 2*M_PI;
cin >> n;
for(int i=0; i<n; i++)
{
cin >> a;
sum += a;
if ( fabs ( sum ) >= period )
{
sum = fmod( sum, period );
}
}
cout << sin ( fabs ( sum )) ;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCiBpbnQgbWFpbigpIHsKICAgaW50IG47CiAgIGRvdWJsZSBhLCBzdW0gPSAwOwogICBkb3VibGUgcGVyaW9kID0gMipNX1BJOwogICBjaW4gPj4gbjsKIAogICBmb3IoaW50IGk9MDsgaTxuOyBpKyspCiAgIHsKICAgICAgY2luID4+IGE7CiAgICAgIHN1bSArPSBhOwogCiAgICAgIGlmICggZmFicyAoIHN1bSApID49IHBlcmlvZCApCiAgICAgIHsKICAgICAgICAgc3VtID0gZm1vZCggc3VtLCBwZXJpb2QgKTsKICAgICAgfQogICB9CiAgIGNvdXQgPDwgc2luICggZmFicyAoIHN1bSApKSA7CiAgIHJldHVybiAwOwp9