#include <bits/stdc++.h>
using namespace std;
int d;
long double x,e,n,ahihi=0;
long double a[1000000],b[1000000];
int main()
{
    freopen("Sinx.inp","r",stdin);
    freopen("Sinx.out","w",stdout);
	cin>>x>>e;
	a[0]=1;b[0]=1;
	for (int i=1;;i++)
    {
        a[i]=a[i-1]*i;
        if (a[i]>LONG_LONG_MAX/(i+1))
        {
            break;
        }
    }
    for (int i=1;;i++)
    {
        b[i]=x*b[i-1];
        if (b[i]>INT_MAX/x)
        {
            break;
        }
    }
    for (int i=1;;i++)
    {
        if ((double)((double)b[i]/(double)a[i])<=(double)e)
        {
            n=i;
            break;
        }
    i++;
    }
    for (int i=1;i<=n;i=i+2)
    {
        cout<<b[i]/a[i]<<endl;
        if (d%2==0)
        {
            ahihi=(ahihi)+(b[i])/(a[i]);
            d++;
        }
        else
        {
            d++;
            ahihi=(ahihi)-(b[i])/(a[i]);
        }
    }
    cout<<ahihi<<endl;
}


