import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
 
public class Main {
	static final int INF = (int) (1e9 + 10);
	static final int MOD = (int) (1e9 + 7);
 
	// static final int N = (int) (4e5 + 5);
	// static ArrayList<Integer>[] graph;
	// static boolean visited[];
	// static long size[];
 
	public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	}
 
	
	private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	}
 
	public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}
 
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
 
	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
 
	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}
 
	public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	}
 
	static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	}
 
	public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	}
 
	public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	}
 
	public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	}
 
	static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	}
 
	static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	}
 
	/*
	 * static boolean prime[] = new boolean[1000007];
	 * 
	 * public static void sieveOfEratosthenes(int n) {
	 * 
	 * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
	 * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
	 * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
	 * p) prime[i] = false; } }
	 * 
	 * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
	 * if(prime[i] == true) // System.out.print(i + " "); // } }
	 */
 
	static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	}
 
	static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	}
 
	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
 
	public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	}
 
} Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		} @Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			} compare {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			} return new Integer(entry1[col]).compareTo(entry2[col]); new Integer(entry1[col]).compareTo(entry2[col]) new Integer(entry1[col]).compareTo new Integer(entry1[col]) entry2[col] entry2 col final int[] entry1 entry1 final int[] entry2 entry2 import java.io.*; io.* java import java.math.BigDecimal; BigDecimal java.math import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java public class Main {
	static final int INF = (int) (1e9 + 10);
	static final int MOD = (int) (1e9 + 7);
 
	// static final int N = (int) (4e5 + 5);
	// static ArrayList<Integer>[] graph;
	// static boolean visited[];
	// static long size[];
 
	public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	}
 
	
	private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	}
 
	public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}
 
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
 
	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
 
	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}
 
	public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	}
 
	static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	}
 
	public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	}
 
	public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	}
 
	public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	}
 
	static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	}
 
	static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	}
 
	/*
	 * static boolean prime[] = new boolean[1000007];
	 * 
	 * public static void sieveOfEratosthenes(int n) {
	 * 
	 * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
	 * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
	 * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
	 * p) prime[i] = false; } }
	 * 
	 * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
	 * if(prime[i] == true) // System.out.print(i + " "); // } }
	 */
 
	static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	}
 
	static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	}
 
	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
 
	public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	}
 
} Main static final int INF = (int) (1e9 + 10); INF (int) (1e9 + 10) 1e9 10 static final int MOD = (int) (1e9 + 7); MOD (int) (1e9 + 7) 1e9 7 public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	} main {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	} FastReader sc = new FastReader(); sc new FastReader() PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); pr new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			} n == 0 n 0 {
			    pr.println(1);
			} pr.println(1) pr.println pr 1 {
			    pr.println(0);
			} pr.println(0) pr.println pr 0 pr.flush() pr.flush pr pr.close() pr.close pr String[] args args private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	} possible {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	} long c = 0; c 0 for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		} int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		} {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		} if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			} (arr[i] * f[f.length - i - 1]) > mid (arr[i] * f[f.length - i - 1]) arr[i] arr i f[f.length - i - 1] f f.length - i - 1 f.length - i - 1 f.length f f.length i 1 mid {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			} c += (arr[i] - (mid / f[f.length - i - 1])) c (arr[i] - (mid / f[f.length - i - 1])) arr[i] arr i (mid / f[f.length - i - 1]) mid f[f.length - i - 1] f f.length - i - 1 f.length - i - 1 f.length f f.length i 1 if (c <= k)
			return true; c <= k c k return true; true return false; false long[] arr arr int[] f f long mid mid long k k public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	} lowerBound {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	} int low = 0; low 0 int high = length; high length while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		} low < high low high {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		} final int mid = (low + high) / 2; mid (low + high) / 2 (low + high) low high 2 if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			} value <= array.get(mid) value array.get(mid) array.get array mid {
				high = mid;
			} high = mid high mid {
				low = mid + 1;
			} low = mid + 1 low mid + 1 mid 1 return low; low ArrayList<Integer> array array int length length long value value static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	} gcd {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	} if (a == 0)
			return b; a == 0 a 0 return b; b return gcd(b % a, a); gcd(b % a, a) gcd b % a b a a long a a long b b static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	} lcm {
		return (a * b) / gcd(a, b);
	} return (a * b) / gcd(a, b); (a * b) / gcd(a, b) (a * b) a b gcd(a, b) gcd a b long a a long b b public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	} sortbyColumn {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	} Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}) Arrays.sort Arrays att new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		} int[][] att att int col col public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	} swap {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	} int temp = data[left]; temp data[left] data left data[left] = data[right] data[left] data left data[right] data right data[right] = temp data[right] data right temp return data; data int data[] data int left left int right right public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	} reverse {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	} while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		} left < right left right {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		} int temp = data[left]; temp data[left] data left data[left++] = data[right] data[left++] data left++ left data[right] data right data[right--] = temp data[right--] data right-- right temp return data; data int data[] data int left left int right right public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	} findNextPermutation {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	} if (data.length <= 1)
			return false; data.length <= 1 data.length data data.length 1 return false; false int last = data.length - 2; last data.length - 2 data.length data data.length 2 while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		} last >= 0 last 0 {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		} if (data[last] < data[last + 1]) {
				break;
			} data[last] < data[last + 1] data[last] data last data[last + 1] data last + 1 last 1 {
				break;
			} break; last-- last if (last < 0)
			return false; last < 0 last 0 return false; false int nextGreater = data.length - 1; nextGreater data.length - 1 data.length data data.length 1 for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		} int i = data.length - 1; int i = data.length - 1; i data.length - 1 data.length data data.length 1 i > last i last i-- i-- i {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		} {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		} if (data[i] > data[last]) {
				nextGreater = i;
				break;
			} data[i] > data[last] data[i] data i data[last] data last {
				nextGreater = i;
				break;
			} nextGreater = i nextGreater i break; data = swap(data, nextGreater, last) data swap(data, nextGreater, last) swap data nextGreater last data = reverse(data, last + 1, data.length - 1) data reverse(data, last + 1, data.length - 1) reverse data last + 1 last 1 data.length - 1 data.length data data.length 1 return true; true int data[] data static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	} nCr {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	} if (n == r)
			return 1; n == r n r return 1; 1 return fact(n) / (fact(r) * fact(n - r)); fact(n) / (fact(r) * fact(n - r)) fact(n) fact n (fact(r) * fact(n - r)) fact(r) fact r fact(n - r) fact n - r n r long n n long r r static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	} fact {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	} long res = 1; res 1 for (long i = 2; i <= n; i++)
			res = res * i; long i = 2; long i = 2; i 2 i <= n i n i++ i++ i res = res * i; res = res * i res res * i res i return res; res long n n static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	} power {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	} long res = 1; res 1 fac2 = fac2 % p fac2 fac2 % p fac2 p while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		} y > 0 y 0 {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		} if (y % 2 == 1)
				res = (res * fac2) % p; y % 2 == 1 y % 2 y 2 1 res = (res * fac2) % p res (res * fac2) % p (res * fac2) res fac2 p fac2 = (fac2 * fac2) % p fac2 (fac2 * fac2) % p (fac2 * fac2) fac2 fac2 p return res; res long fac2 fac2 int y y int p p static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	} modInverse {
		return power(fac2, p - 2, p);
	} return power(fac2, p - 2, p); power(fac2, p - 2, p) power fac2 p - 2 p 2 p long fac2 fac2 int p p static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	} isPrime {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	} if (n <= 1)
			return false; n <= 1 n 1 return false; false if (n <= 3)
			return true; n <= 3 n 3 return true; true if (n % 2 == 0 || n % 3 == 0)
			return false; n % 2 == 0 || n % 3 == 0 n % 2 == 0 n % 2 n 2 0 n % 3 == 0 n % 3 n 3 0 return false; false for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false; int i = 5; int i = 5; i 5 i * i <= n i * i i i n i = i + 6 i = i + 6 i i + 6 i 6 if (n % i == 0 || n % (i + 2) == 0)
				return false; if (n % i == 0 || n % (i + 2) == 0)
				return false; n % i == 0 || n % (i + 2) == 0 n % i == 0 n % i n i 0 n % (i + 2) == 0 n % (i + 2) n (i + 2) i 2 0 return false; false return true; true int n n public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	} lcmm {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	} BigInteger s = new BigInteger(a); s new BigInteger(a) BigInteger s1 = new BigInteger(b); s1 new BigInteger(b) BigInteger mul = s.multiply(s1); mul s.multiply(s1) s.multiply s s1 BigInteger gcd = s.gcd(s1); gcd s.gcd(s1) s.gcd s s1 BigInteger lcm = mul.divide(gcd); lcm mul.divide(gcd) mul.divide mul gcd return lcm; lcm String a a String b b static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	} FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		} FastReader {
			br = new BufferedReader(new InputStreamReader(System.in));
		} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		} while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			} st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			} try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				} catch (IOException e) {
					e.printStackTrace();
				} IOException e {
					e.printStackTrace();
				} e.printStackTrace() e.printStackTrace e {
					st = new StringTokenizer(br.readLine());
				} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		} nextLine {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		} String str = ""; str "" try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} IOException e {
				e.printStackTrace();
			} e.printStackTrace() e.printStackTrace e {
				str = br.readLine();
			} str = br.readLine() str br.readLine() br.readLine br return str; str static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	} pair int V V I; I pair(int v, int i) {
			V = v;
			I = i;
		} pair {
			V = v;
			I = i;
		} V = v V v I = i I i int v v int i i public class Main {
	static final int INF = (int) (1e9 + 10);
	static final int MOD = (int) (1e9 + 7);
 
	// static final int N = (int) (4e5 + 5);
	// static ArrayList<Integer>[] graph;
	// static boolean visited[];
	// static long size[];
 
	public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	}
 
	
	private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	}
 
	public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}
 
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
 
	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
 
	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}
 
	public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	}
 
	static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	}
 
	public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	}
 
	public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	}
 
	public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	}
 
	static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	}
 
	static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	}
 
	/*
	 * static boolean prime[] = new boolean[1000007];
	 * 
	 * public static void sieveOfEratosthenes(int n) {
	 * 
	 * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
	 * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
	 * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
	 * p) prime[i] = false; } }
	 * 
	 * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
	 * if(prime[i] == true) // System.out.print(i + " "); // } }
	 */
 
	static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	}
 
	static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	}
 
	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
 
	public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	}
 
} public class Main {
	static final int INF = (int) (1e9 + 10);
	static final int MOD = (int) (1e9 + 7);
 
	// static final int N = (int) (4e5 + 5);
	// static ArrayList<Integer>[] graph;
	// static boolean visited[];
	// static long size[];
 
	public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	}
 
	
	private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	}
 
	public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}
 
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
 
	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
 
	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}
 
	public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	}
 
	static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	}
 
	public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	}
 
	public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	}
 
	public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	}
 
	static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	}
 
	static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	}
 
	/*
	 * static boolean prime[] = new boolean[1000007];
	 * 
	 * public static void sieveOfEratosthenes(int n) {
	 * 
	 * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
	 * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
	 * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
	 * p) prime[i] = false; } }
	 * 
	 * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
	 * if(prime[i] == true) // System.out.print(i + " "); // } }
	 */
 
	static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	}
 
	static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	}
 
	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
 
	public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	}
 
} Main
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
 
public class Main {
	static final int INF = (int) (1e9 + 10);
	static final int MOD = (int) (1e9 + 7);
 
	// static final int N = (int) (4e5 + 5);
	// static ArrayList<Integer>[] graph;
	// static boolean visited[];
	// static long size[];
 
	public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 		int t = sc.nextInt();
		
// 		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 0){
			    pr.println(1);
			}else{
			    pr.println(0);
			}
			
			
// 			pr.println(ans);
 
// 		}
		pr.flush();
		pr.close();
	}
 
	
	private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	}
 
	public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}
 
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
 
	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
 
	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}
 
	public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	}
 
	static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	}
 
	public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	}
 
	public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	}
 
	public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	}
 
	static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	}
 
	static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	}
 
	/*
	 * static boolean prime[] = new boolean[1000007];
	 * 
	 * public static void sieveOfEratosthenes(int n) {
	 * 
	 * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
	 * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
	 * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
	 * p) prime[i] = false; } }
	 * 
	 * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
	 * if(prime[i] == true) // System.out.print(i + " "); // } }
	 */
 
	static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	}
 
	static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	}
 
	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
 
	public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	}
 
}