#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#include <ext/rope>
using namespace __gnu_cxx;

typedef tree<long long, null_type, less<long long>,
rb_tree_tag, tree_order_statistics_node_update> pbds;
//less_equal for identical elements

#define DEBUG

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__);
#else
#define debug(...)
#endif
#define sf scanf
#define pf printf
#define fi first
#define se second
#define pb emplace_back
#define sz(x) (int)x.size()
#define mnto(x,y) x=min(x,(__typeof__(x))y)
#define mxto(x,y) x=max(x,(__typeof__(x))y)
#define INF 1023456789
#define LINF 1023456789123456789
#define all(x) x.begin(), x.end()
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef tuple<int, int, int> iii;
typedef tuple<int, int, int, int> iiii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vll;

int t,n;

int main(){
	sf("%d%d",&t,&n);
	pf("%lld\n",((ll)n*100+t-1)/t+n-1);
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
// const int MOD = 998244353;
struct mint {
	ll x;
	mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
	mint operator-() { return mint(-x); }
	mint operator+=(mint rhs) {
		x += rhs.x;
		if (x >= MOD) x -= MOD;
		return *this;
	}
	mint operator-=(mint rhs) {
		x -= rhs.x;
		if (x < 0) x += MOD;
		return *this;
	}
	mint operator*=(mint rhs) {
		x = x * rhs.x % MOD;
		return *this;
	}
	mint operator+(mint rhs) { return mint(*this) += rhs; }
	mint operator-(mint rhs) { return mint(*this) -= rhs; }
	mint operator*(mint rhs) { return mint(*this) *= rhs; }
	mint pow(ll n) {
		mint r = 1;
		for (mint t = (*this); n; t *= t, n >>= 1)
			if (n & 1) r *= t;
		return r;
	}
	mint inv() { return (*this).pow(MOD - 2); }
	mint operator/=(mint rhs) { return *this *= rhs.inv(); }
	mint operator/(mint rhs) { return mint(*this) /= rhs; }
};
ostream &operator<<(ostream &os, const mint &dt) {
	os << dt.x;
	return os;
}
int main() {
	int n, p;
	cin >> n >> p;
	mint ans = mint(p - 2).pow(n - 1) * (p - 1);
	cout << ans << endl;
	return 0;
}