#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
double x, p = 1;
double cs, sc;
cin >> x;
cin >> n;
cs = cos(fabs(x));
sc = cos(fabs(x));
for(int k = 1; k <=n; k++)
{
p*= (k / (k + 1)) - cs;
cs*=sc;
}
cout << p << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWRvdWJsZSB4LCBwID0gMTsKCWRvdWJsZSBjcywgc2M7CgljaW4gPj4geDsKCWNpbiA+PiBuOwoJY3MgPSBjb3MoZmFicyh4KSk7CglzYyA9IGNvcyhmYWJzKHgpKTsKCWZvcihpbnQgayA9IDE7IGsgPD1uOyBrKyspCgl7CgkJcCo9IChrIC8gKGsgKyAxKSkgLSBjczsKCQljcyo9c2M7Cgl9Cgljb3V0IDw8IHAgPDwgZW5kbDsKCXJldHVybiAwOwp9