# use strict; # use warnings; chomp(my $L = <>); chomp(my $N = <>); print((2 ** ($L - 3)) * $N);