import sun.reflect.generics.tree.Tree;

import javax.lang.model.type.IntersectionType;
import java.io.*;
import java.util.*;

public class Main {


    public static void main(String Args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = Math.abs(b - a);
        int ans = 0;
        int pred = 0;
        for (int i = 0; i < count / 2; i++) {
            ans += ans + 1;
            pred = i + 1;
        }
        System.out.println(ans * 2 + (count % 2) * (pred + 1));

    }
}
