#include int main(void) { // your code goes here unsigned long ans, l, n, i; fscanf(stdin, "%d", &l); fscanf(stdin, "%d", &n); l -= 3; ans = 1; for(i = 0; i < l; i++) ans = ans * 2; ans *= n; printf("%ld\n", ans); return 0; }