#include <fstream>
#include <cmath>
#include <iomanip>

using namespace std;

ifstream fi ("SINx.INP");
ofstream fo ("SINx.OUT");

double giaithua (int a){
  double t=1;
  if (a==1) return 1;
  else {
  for (int i=2;i<=a;i++){t=t*i;}

  return t;
}

}
double tinhsin(double a,double e){
  double t = 0;
  int p=1,i=0;
  while ((pow(a,2*i+1)/giaithua(2*i+1))>e){
    t+=pow(-1,i)*pow(a,2*i+1)/giaithua(2*i+1);
    fo << pow(-1,i)*pow(a,2*i+1)/giaithua(2*i+1) << endl;
    i++;
  }
  return t;
}

int main(){
  double x,e;
  fi>>x>>e;
  fo<< fixed << setprecision(4) << tinhsin(x,e);
  return 0;
}
