#include <iostream>
#include <math.h>
using namespace std;
int main() {
double S=0;
int k,t;
cin >>k>>t;
for(int i=1;i<=k;i++){
for(int j=1;j<=t;j++){
S+=sin(i*i*i+j*j*j*j);
}
}
cout << S;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKICAgIGRvdWJsZSBTPTA7CiAgICBpbnQgayx0OwogICAgY2luID4+az4+dDsKICAgIGZvcihpbnQgaT0xO2k8PWs7aSsrKXsKICAgICAgICBmb3IoaW50IGo9MTtqPD10O2orKyl7CiAgICAgICAgICAgIFMrPXNpbihpKmkqaStqKmoqaipqKTsKICAgIAl9CiAgICB9CiAgICBjb3V0IDw8IFM7CiAgICByZXR1cm4gMDsKfQ==