// editor2
#include <stdio.h>
#include <math.h>

long long calculatespellPower(int base, int exponent) {
    
    if (base < 0) {
        return -1;
    }
    
    return (long long)pow(base, exponent);
}

int main() {
    int base, exponent;
    
    scanf("%d", &base);
    
    scanf("%d", &exponent);
    
    long long result = calculateSpellPower(base, exponent);
    
    if (result == -1) {
        printf("Invalid input\n")
    } else {
        printf("%lld\n", result);
    }
    return 0;
}