#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for (int i=0; i<n; i++) {
cin >> a[i];
}
double sum=0;
int f=1;
for (int i=1; i<=n; i++) {
f*=i;
double sign = (i%2==0) ? 1 : -1;
sum+=(sign*a[i-1])/f;
}
cout << sum << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWNpbiA+PiBuOwoJaW50IGFbbl07Cglmb3IgKGludCBpPTA7IGk8bjsgaSsrKSB7CgkJY2luID4+IGFbaV07Cgl9Cglkb3VibGUgc3VtPTA7CglpbnQgZj0xOwoJZm9yIChpbnQgaT0xOyBpPD1uOyBpKyspIHsKCQlmKj1pOwoJCWRvdWJsZSBzaWduID0gKGklMj09MCkgPyAxIDogLTE7CgkJc3VtKz0oc2lnbiphW2ktMV0pL2Y7Cgl9Cgljb3V0IDw8IHN1bSA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=