public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner input = new Scanner(System.in);
        int firstInt = input.nextInt();
        int secondInt = input.nextInt();
        int multiple = firstInt * secondInt;
        System.out.println(multiple % 2 == 0);

    }
}
