
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static Map<BigInteger, Integer> memo;
    static boolean[][] vis;
    static List<List<Integer>> adj;
    static List<Integer> vertices;

    static class Point {
        int i, j;

        public Point(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }

    //# North, South, East and West direction vectors
//dr = [-1, +1, 0, 0]
//dc = [0, 0, +1, -1]
    static int[][][] cache;
    static Map<Integer, Integer> memo2;

    void UVA_11407() throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    }

    static boolean checkEmpty(String word,String res) {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    }


    static int countTerm(int n, int i, int count) {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    }


    static int countStrings(char[] arr, int i, int s, int l, String concat) {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    }

    static void countMoves(Point[][] grid, int start, int end, int start2, int end2, boolean[][] vis, int sumRed, int sumBlue) {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    }


    static long countWin(long h) {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    }

    static int lowerBound(int[] arr, int element) {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    }

    static boolean isPalindrome(String word) {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    }

    static String longestPalindrome(String[] words, String word, int i) {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    }


    static int solve(int[] arr, int i, int j, int k) {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    }

    static int minMove(BigInteger bg, int count) {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java public class Main {
    static Map<BigInteger, Integer> memo;
    static boolean[][] vis;
    static List<List<Integer>> adj;
    static List<Integer> vertices;

    static class Point {
        int i, j;

        public Point(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }

    //# North, South, East and West direction vectors
//dr = [-1, +1, 0, 0]
//dc = [0, 0, +1, -1]
    static int[][][] cache;
    static Map<Integer, Integer> memo2;

    void UVA_11407() throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    }

    static boolean checkEmpty(String word,String res) {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    }


    static int countTerm(int n, int i, int count) {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    }


    static int countStrings(char[] arr, int i, int s, int l, String concat) {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    }

    static void countMoves(Point[][] grid, int start, int end, int start2, int end2, boolean[][] vis, int sumRed, int sumBlue) {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    }


    static long countWin(long h) {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    }

    static int lowerBound(int[] arr, int element) {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    }

    static boolean isPalindrome(String word) {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    }

    static String longestPalindrome(String[] words, String word, int i) {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    }


    static int solve(int[] arr, int i, int j, int k) {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    }

    static int minMove(BigInteger bg, int count) {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    }
} Main static Map<BigInteger, Integer> memo; memo static boolean[][] vis; vis static List<List<Integer>> adj; adj static List<Integer> vertices; vertices //# North, South, East and West direction vectors
//dr = [-1, +1, 0, 0]
//dc = [0, 0, +1, -1]
    static int[][][] cache; cache static Map<Integer, Integer> memo2; memo2 void UVA_11407() throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    } UVA_11407 {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); bf new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(bf.readLine()); st new StringTokenizer(bf.readLine()) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int t = Integer.parseInt(st.nextToken()); t Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        } t-- > 0 t-- t 0 {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        } st = new StringTokenizer(bf.readLine()) st new StringTokenizer(bf.readLine()) int n = Integer.parseInt(st.nextToken()); n Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st memo2 = new HashMap<>() memo2 new HashMap<>() sb.append(countTerm(n, 0, 0)).append("\n") sb.append(countTerm(n, 0, 0)).append sb.append(countTerm(n, 0, 0)) sb.append sb countTerm(n, 0, 0) countTerm n 0 0 "\n" System.out.print(sb) System.out.print System.out System System.out sb public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc System.out.println(n == 1 ? 0 : 1) System.out.println System.out System System.out n == 1 ? 0 : 1 n == 1 n 1 0 1 String[] args args static boolean checkEmpty(String word,String res) {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    } checkEmpty {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    } if (word.equals(""))
            return true; word.equals("") word.equals word "" return true; true int count = 1; count 1 for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        } int i = 1; int i = 1; i 1 i < word.length() i word.length() word.length word ++i ++i i {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        } {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        } if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            } word.charAt(i) == word.charAt(i - 1) word.charAt(i) word.charAt word i word.charAt(i - 1) word.charAt word i - 1 i 1 {
                count++;
                res += word.charAt(i);
            } count++ count res += word.charAt(i) res word.charAt(i) word.charAt word i {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            } if (res.length() >= 1)
                    res += word.charAt(i - 1); res.length() >= 1 res.length() res.length res 1 res += word.charAt(i - 1) res word.charAt(i - 1) word.charAt word i - 1 i 1 if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                } count >= 2 count 2 {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                } word = word.replace(res, "") word word.replace(res, "") word.replace word res "" return checkEmpty(word,""); checkEmpty(word,"") checkEmpty word "" if (res.length() >= 1)
            res += word.charAt(word.length() - 1); res.length() >= 1 res.length() res.length res 1 res += word.charAt(word.length() - 1) res word.charAt(word.length() - 1) word.charAt word word.length() - 1 word.length() word.length word 1 if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        } count >= 2 count 2 {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        } word = word.replace(res, "") word word.replace(res, "") word.replace word res "" return checkEmpty(word,""); checkEmpty(word,"") checkEmpty word "" return false; false String word word String res res static int countTerm(int n, int i, int count) {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    } countTerm {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    } if (i > n)
            return Integer.MAX_VALUE; i > n i n return Integer.MAX_VALUE; Integer.MAX_VALUE Integer Integer.MAX_VALUE if (i == n)
            return count; i == n i n return count; count int ret ret min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        } int j = 1; int j = 1; j 1 j <= n j n ++j ++j j {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        } {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        } ret = countTerm(n, i + j * j, count + 1) ret countTerm(n, i + j * j, count + 1) countTerm n i + j * j i j * j j j count + 1 count 1 min = Math.min(min, ret) min Math.min(min, ret) Math.min Math min ret memo2.put(i, count) memo2.put memo2 i count return min; min int n n int i i int count count static int countStrings(char[] arr, int i, int s, int l, String concat) {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    } countStrings {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    } if (i >= arr.length) {
            return 0;
        } i >= arr.length i arr.length arr arr.length {
            return 0;
        } return 0; 0 if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        } l == 0 l 0 {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        } int sum = 0; sum 0 for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            } int j = 0; int j = 0; j 0 j < concat.length() - 1 j concat.length() - 1 concat.length() concat.length concat 1 ++j ++j j {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            } {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            } if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0; concat.charAt(j) > concat.charAt(j + 1) concat.charAt(j) concat.charAt concat j concat.charAt(j + 1) concat.charAt concat j + 1 j 1 return 0; 0 for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            } int j = 0; int j = 0; j 0 j < concat.length() j concat.length() concat.length concat ++j ++j j {
                sum += concat.charAt(j) - 'a' + 1;
            } {
                sum += concat.charAt(j) - 'a' + 1;
            } sum += concat.charAt(j) - 'a' + 1 sum concat.charAt(j) - 'a' + 1 concat.charAt(j) - 'a' concat.charAt(j) concat.charAt concat j 'a' 1 if (sum == s)
                return 1; sum == s sum s return 1; 1 return 0; 0 if (l < 0)
            return 0; l < 0 l 0 return 0; 0 int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]); left countStrings(arr, i + 1, s, l - 1, concat + arr[i]) countStrings arr i + 1 i 1 s l - 1 l 1 concat + arr[i] concat arr[i] arr i int right = countStrings(arr, i + 1, s, l, concat); right countStrings(arr, i + 1, s, l, concat) countStrings arr i + 1 i 1 s l concat return left + right; left + right left right char[] arr arr int i i int s s int l l String concat concat static void countMoves(Point[][] grid, int start, int end, int start2, int end2, boolean[][] vis, int sumRed, int sumBlue) {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    } countMoves {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    } if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return; start >= grid.length || start < 0 || end >= grid[0].length || end < 0 end >= grid[0].length start >= grid.length || start < 0 || end >= grid[0].length || end < 0 start >= grid.length start grid.length grid grid.length start < 0 start 0 end >= grid[0].length end grid[0].length grid[0] grid 0 grid[0].length end < 0 end 0 return; Point[][] grid grid int start start int end end int start2 start2 int end2 end2 boolean[][] vis vis int sumRed sumRed int sumBlue sumBlue static long countWin(long h) {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    } countWin {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    } if (h == 1)
            return 1; h == 1 h 1 return 1; 1 return 2 * countWin(h / 2) + 1; 2 * countWin(h / 2) + 1 2 * countWin(h / 2) 2 countWin(h / 2) countWin h / 2 h 2 1 long h h static int lowerBound(int[] arr, int element) {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    } lowerBound {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    } int low = 0 low 0 high = arr.length - 1 high arr.length - 1 arr.length arr arr.length 1 ans = 0; ans 0 while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        } low <= high low high {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        } int mid = low + (high - low) / 2; mid low + (high - low) / 2 low (high - low) / 2 (high - low) high low 2 if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1; arr[mid] <= element arr[mid] arr mid element {
                low = mid + 1;
                ans = mid;
            } low = mid + 1 low mid + 1 mid 1 ans = mid ans mid high = mid - 1 high mid - 1 mid 1 return high; high int[] arr arr int element element static boolean isPalindrome(String word) {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    } isPalindrome {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    } int i = 0 i 0 j = word.length() - 1; j word.length() - 1 word.length() word.length word 1 while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        } i <= j i j {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        } if (word.charAt(i++) != word.charAt(j--))
                return false; word.charAt(i++) != word.charAt(j--) word.charAt(i++) word.charAt word i++ i word.charAt(j--) word.charAt word j-- j return false; false return true; true String word word static String longestPalindrome(String[] words, String word, int i) {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    } longestPalindrome {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    } if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        } i >= words.length i words.length words words.length {
            if (isPalindrome(word))
                return word;

            return "";
        } if (isPalindrome(word))
                return word; isPalindrome(word) isPalindrome word return word; word return ""; "" if (word.length() > 0 && isPalindrome(word))
            return word; word.length() > 0 && isPalindrome(word) word.length() > 0 word.length() word.length word 0 isPalindrome(word) isPalindrome word return word; word String left = longestPalindrome(words, word + words[i], i + 1); left longestPalindrome(words, word + words[i], i + 1) longestPalindrome words word + words[i] word words[i] words i i + 1 i 1 String right = longestPalindrome(words, word, i + 1); right longestPalindrome(words, word, i + 1) longestPalindrome words word i + 1 i 1 if (left.length() > 0)
            return left; left.length() > 0 left.length() left.length left 0 return left; left return right; right String[] words words String word word int i i static int solve(int[] arr, int i, int j, int k) {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    } solve {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    } if (i == j && arr[i] <= k)
            return 1; i == j && arr[i] <= k i == j i j arr[i] <= k arr[i] arr i k return 1; 1 int left = 0 left 0 right = 0; right 0 if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1; arr[i] <= k arr[i] arr i k left = solve(arr, i + 1, j, k) + 1 left solve(arr, i + 1, j, k) + 1 solve(arr, i + 1, j, k) solve arr i + 1 i 1 j k 1 if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1; arr[j] <= k arr[j] arr j k right = solve(arr, i, j - 1, k) + 1 right solve(arr, i, j - 1, k) + 1 solve(arr, i, j - 1, k) solve arr i j - 1 j 1 k 1 return left + right; left + right left right int[] arr arr int i i int j j int k k static int minMove(BigInteger bg, int count) {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    } minMove {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    } if (bg.equals(BigInteger.ONE))
            return count; bg.equals(BigInteger.ONE) bg.equals bg BigInteger.ONE BigInteger BigInteger.ONE return count; count int first = Integer.MAX_VALUE first Integer.MAX_VALUE Integer Integer.MAX_VALUE sec = Integer.MAX_VALUE sec Integer.MAX_VALUE Integer Integer.MAX_VALUE last = Integer.MAX_VALUE; last Integer.MAX_VALUE Integer Integer.MAX_VALUE if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1); bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0 bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) bg.mod(BigInteger.valueOf(2)).compareTo bg.mod(BigInteger.valueOf(2)) bg.mod bg BigInteger.valueOf(2) BigInteger.valueOf BigInteger 2 BigInteger.ZERO BigInteger BigInteger.ZERO 0 first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1) first minMove(bg.divide(BigInteger.valueOf(2)), count + 1) minMove bg.divide(BigInteger.valueOf(2)) bg.divide bg BigInteger.valueOf(2) BigInteger.valueOf BigInteger 2 count + 1 count 1 if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1); bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0 bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) bg.mod(BigInteger.valueOf(3)).compareTo bg.mod(BigInteger.valueOf(3)) bg.mod bg BigInteger.valueOf(3) BigInteger.valueOf BigInteger 3 BigInteger.ZERO BigInteger BigInteger.ZERO 0 sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1) sec minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1) minMove bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)) bg.multiply(BigInteger.valueOf(2)).divide bg.multiply(BigInteger.valueOf(2)) bg.multiply bg BigInteger.valueOf(2) BigInteger.valueOf BigInteger 2 BigInteger.valueOf(3) BigInteger.valueOf BigInteger 3 count + 1 count 1 if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1); bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0 bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) bg.mod(BigInteger.valueOf(5)).compareTo bg.mod(BigInteger.valueOf(5)) bg.mod bg BigInteger.valueOf(5) BigInteger.valueOf BigInteger 5 BigInteger.ZERO BigInteger BigInteger.ZERO 0 last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1) last minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1) minMove bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)) bg.multiply(BigInteger.valueOf(4)).divide bg.multiply(BigInteger.valueOf(4)) bg.multiply bg BigInteger.valueOf(4) BigInteger.valueOf BigInteger 4 BigInteger.valueOf(5) BigInteger.valueOf BigInteger 5 count + 1 count 1 if (memo.containsKey(bg))
            return memo.get(bg); memo.containsKey(bg) memo.containsKey memo bg return memo.get(bg); memo.get(bg) memo.get memo bg memo.put(bg, Math.min(first, Math.min(sec, last))) memo.put memo bg Math.min(first, Math.min(sec, last)) Math.min Math first Math.min(sec, last) Math.min Math sec last return Math.min(first, Math.min(sec, last)); Math.min(first, Math.min(sec, last)) Math.min Math first Math.min(sec, last) Math.min Math sec last BigInteger bg bg int count count static class Point {
        int i, j;

        public Point(int i, int j) {
            this.i = i;
            this.j = j;
        }
    } Point int i i j; j public Point(int i, int j) {
            this.i = i;
            this.j = j;
        } Point {
            this.i = i;
            this.j = j;
        } this.i = i this.i this this.i i this.j = j this.j this this.j j int i i int j j public class Main {
    static Map<BigInteger, Integer> memo;
    static boolean[][] vis;
    static List<List<Integer>> adj;
    static List<Integer> vertices;

    static class Point {
        int i, j;

        public Point(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }

    //# North, South, East and West direction vectors
//dr = [-1, +1, 0, 0]
//dc = [0, 0, +1, -1]
    static int[][][] cache;
    static Map<Integer, Integer> memo2;

    void UVA_11407() throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    }

    static boolean checkEmpty(String word,String res) {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    }


    static int countTerm(int n, int i, int count) {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    }


    static int countStrings(char[] arr, int i, int s, int l, String concat) {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    }

    static void countMoves(Point[][] grid, int start, int end, int start2, int end2, boolean[][] vis, int sumRed, int sumBlue) {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    }


    static long countWin(long h) {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    }

    static int lowerBound(int[] arr, int element) {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    }

    static boolean isPalindrome(String word) {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    }

    static String longestPalindrome(String[] words, String word, int i) {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    }


    static int solve(int[] arr, int i, int j, int k) {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    }

    static int minMove(BigInteger bg, int count) {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    }
} public class Main {
    static Map<BigInteger, Integer> memo;
    static boolean[][] vis;
    static List<List<Integer>> adj;
    static List<Integer> vertices;

    static class Point {
        int i, j;

        public Point(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }

    //# North, South, East and West direction vectors
//dr = [-1, +1, 0, 0]
//dc = [0, 0, +1, -1]
    static int[][][] cache;
    static Map<Integer, Integer> memo2;

    void UVA_11407() throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    }

    static boolean checkEmpty(String word,String res) {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    }


    static int countTerm(int n, int i, int count) {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    }


    static int countStrings(char[] arr, int i, int s, int l, String concat) {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    }

    static void countMoves(Point[][] grid, int start, int end, int start2, int end2, boolean[][] vis, int sumRed, int sumBlue) {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    }


    static long countWin(long h) {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    }

    static int lowerBound(int[] arr, int element) {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    }

    static boolean isPalindrome(String word) {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    }

    static String longestPalindrome(String[] words, String word, int i) {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    }


    static int solve(int[] arr, int i, int j, int k) {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    }

    static int minMove(BigInteger bg, int count) {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    }
} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static Map<BigInteger, Integer> memo;
    static boolean[][] vis;
    static List<List<Integer>> adj;
    static List<Integer> vertices;

    static class Point {
        int i, j;

        public Point(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }

    //# North, South, East and West direction vectors
//dr = [-1, +1, 0, 0]
//dc = [0, 0, +1, -1]
    static int[][][] cache;
    static Map<Integer, Integer> memo2;

    void UVA_11407() throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(bf.readLine());
        StringBuilder sb = new StringBuilder();
        int t = Integer.parseInt(st.nextToken());
        while (t-- > 0) {
            st = new StringTokenizer(bf.readLine());
            int n = Integer.parseInt(st.nextToken());
            memo2 = new HashMap<>();
            sb.append(countTerm(n, 0, 0)).append("\n");
        }
        System.out.print(sb);
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        System.out.println(n == 1 ? 0 : 1);



    }

    static boolean checkEmpty(String word,String res) {
        if (word.equals(""))
            return true;

        int count = 1;
        for (int i = 1; i < word.length(); ++i) {
            if (word.charAt(i) == word.charAt(i - 1)) {
                count++;
                res += word.charAt(i);
            } else {
                if (res.length() >= 1)
                    res += word.charAt(i - 1);
                if (count >= 2) {
                    word = word.replace(res, "");
                    return checkEmpty(word,"");
                }
            }
        }
        if (res.length() >= 1)
            res += word.charAt(word.length() - 1);
        if (count >= 2) {
            word = word.replace(res, "");
            return checkEmpty(word,"");
        }
        return false;
    }


    static int countTerm(int n, int i, int count) {
        if (i > n)
            return Integer.MAX_VALUE;

        if (i == n)
            return count;

//        if (memo2.get(i) != null)
//            return memo2.get(i);

        int ret, min = Integer.MAX_VALUE;

        for (int j = 1; j <= n; ++j) {
            ret = countTerm(n, i + j * j, count + 1);
            min = Math.min(min, ret);
        }

        memo2.put(i, count);
        return min;
    }


    static int countStrings(char[] arr, int i, int s, int l, String concat) {
        if (i >= arr.length) {
            return 0;
        }
        if (l == 0) {
            int sum = 0;
            for (int j = 0; j < concat.length() - 1; ++j) {
                if (concat.charAt(j) > concat.charAt(j + 1))
                    return 0;
            }
            for (int j = 0; j < concat.length(); ++j) {
                sum += concat.charAt(j) - 'a' + 1;
            }
            if (sum == s)
                return 1;
            return 0;
        }
        if (l < 0)
            return 0;


        int left = countStrings(arr, i + 1, s, l - 1, concat + arr[i]);
        int right = countStrings(arr, i + 1, s, l, concat);

        return left + right;
    }

    static void countMoves(Point[][] grid, int start, int end, int start2, int end2, boolean[][] vis, int sumRed, int sumBlue) {
        if (start >= grid.length || start < 0 || end >= grid[0].length || end < 0)
            return;

        // countMoves(grid,start+1,end,start2,end2,vis,sumRed+grid[start][end].i,sumB);

    }


    static long countWin(long h) {
        if (h == 1)
            return 1;

        return 2 * countWin(h / 2) + 1;

    }

    static int lowerBound(int[] arr, int element) {

        int low = 0, high = arr.length - 1, ans = 0;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            if (arr[mid] <= element) {
                low = mid + 1;
                ans = mid;
            } else
                high = mid - 1;

        }

        return high;
    }

    static boolean isPalindrome(String word) {
        int i = 0, j = word.length() - 1;

        while (i <= j) {
            if (word.charAt(i++) != word.charAt(j--))
                return false;
        }

        return true;
    }

    static String longestPalindrome(String[] words, String word, int i) {
        if (i >= words.length) {
            if (isPalindrome(word))
                return word;

            return "";
        }

        if (word.length() > 0 && isPalindrome(word))
            return word;
        String left = longestPalindrome(words, word + words[i], i + 1);
        String right = longestPalindrome(words, word, i + 1);

        if (left.length() > 0)
            return left;
        return right;
    }


    static int solve(int[] arr, int i, int j, int k) {
        if (i == j && arr[i] <= k)
            return 1;

        int left = 0, right = 0;
        if (arr[i] <= k)
            left = solve(arr, i + 1, j, k) + 1;

        else if (arr[j] <= k)
            right = solve(arr, i, j - 1, k) + 1;

        return left + right;
    }

    static int minMove(BigInteger bg, int count) {
        if (bg.equals(BigInteger.ONE))
            return count;

        int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;
        if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)
            first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);

        else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)
            sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);

        else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)
            last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);

        if (memo.containsKey(bg))
            return memo.get(bg);

        memo.put(bg, Math.min(first, Math.min(sec, last)));

        return Math.min(first, Math.min(sec, last));
    }
}
