#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
ll t, n, m, k, l, r, op, x, y;
const int mod = 233333;
void solve() {
cin >> n >> m;
x = n;
ll ans = 1;
while (m) {
if (m % 2) {
ans = (ans * n) % mod;
}
n = (n * n) % mod;
m >>= 1;
}
cout << ans;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}