#include<bits/stdc++.h>
#define PI 3.141592653589793238462
#define eps 1e-20
#define fi first
#define se second
using namespace std;
using cd = complex<double>;
typedef long long ll;
typedef long double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<db,db> pdd;
ll mod=1e9+7;
ll qpow(ll a,ll b){
    ll res=1;
    while(b){
        if(b&1) res=res*a%mod;
        a=a*a%mod;b/=2;
    }return res%mod;
}
int main(){
    ll n,p;cin>>n>>p;
    ll x=p-1,ans=x;
    ans*=qpow(x-1,n-1);
    cout<<ans%mod<<endl;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    ll a, b;
    cin>>a>>b;

    cout<<a*b/(double)100<<endl;
    return 0;
}
