

Input

The input contains a single integer a (10 ≤ a ≤ 999).

Output

Output 0 or 1.

Examples

Input

13


Output

1


Input

927


Output

1


Input

48


Output

0

import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Set;

public class Driver {

	public static Scanner scanner;

	public static void main(String[] args) {

		scanner = new Scanner(System.in);
		Driver driver = new Driver();

		int n = scanner.nextInt();
		
		if(n%2==0) {
			System.out.println(0);
		}else {
			System.out.println(1);
		}
		

	}

}

/*
 *  
	
	
*/
