

////////////////////---------------------------SHUBHAM CHAUDHARI-------------------------------///////////////////////


import java.math.BigInteger;
import java.util.*;

public class Main {

    static int mod=1000000007;
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int m =in.nextInt();
        int max=Math.max(n,m);
        BigInteger big=new BigInteger("2");
        BigInteger mod=new BigInteger("1000000007");
        BigInteger ans=big.modPow(new BigInteger(""+m),mod);
        System.out.println(ans);


    }





}
class Pair{
    int l;
    int r;

    public Pair(int l, int r) {
        this.l = l;
        this.r = r;
    }

    public int getL() {
        return l;
    }

    public void setL(int l) {
        this.l = l;
    }

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }
}



