import java.io.*;
import java.util.*;
import java.math.*;

public class pinetree_aa_funny {
	public static void main(String[] args) {
		new pinetree_aa_funny().run();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	boolean eof = false;
	Random rand = new Random(125475452);

	private void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	void check(boolean u) {
		if (!u) {
			throw new Error("Assertion failed!!!");
		}
	}

	String FNAME = "pinetree";

	int MAX = (int) 1e5;

	private void solve() throws IOException {
		int n = nextInt();
		check(2 <= n && n <= MAX);
		if (n <= 100) {
			out.println(1);
		} else {
			out.println(8);
		}
	}

}