There is a legend in the IT City college. A student that failed to answer all questions on the game theory exam is given one more chance by his professor. The student has to play a game with the professor.The game is played on a square field consisting of n × n cells. Initially all cells are empty. On each turn a player chooses and paint an empty cell that has no common sides with previously painted cells. Adjacent corner of painted cells is allowed. On the next turn another player does the same, then the first one and so on. The player with no cells to paint on his turn loses.The professor have chosen the field size n and allowed the student to choose to be the first or the second player in the game. What should the student choose to win the game? Both players play optimally.

The only line of the input contains one integer n (1 ≤ n ≤ 1018) — the size of the field.

Output number 1, if the player making the first turn wins when both players play optimally, otherwise print number 2.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class R {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long n = Long.parseLong(br.readLine());
		System.out.println(n % 2 == 0 ? 2 : 1);

	}

}

import java.util.Scanner;
public class Main {

	public static void main(String args[])
	{
		Scanner Sc=new Scanner(System.in);
		long n=Sc.nextLong();
		if(n%2==0)
			System.out.println("2");
		else
			System.out.println("1");
	}
}

import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author quan.vuhong
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        if(n%2==0){
            System.out.println(2);
        } else {
            System.out.println(1);
        }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
public class codeforces {

     static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

    public static void main(String[] args) {
        //Input reader here ...............
        InputStream inputStream = System.in;
        InputReader sc = new InputReader(inputStream);
        long k = Long.parseLong(sc.next());
        if(k%2==0)  System.out.println("2");
        else System.out.println("1");

      }

}

import java.util.*;
public class game {
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		long x=sc.nextLong();
		if(x%2==0)
		{
			System.out.println("2");
		}
		else
		{
			System.out.println("1");
		}
	}
}

import java.util.Scanner;

public class Game {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long l = sc.nextLong();
		if(l%2==0)
			System.out.println(2);
		else
			System.out.println(1);
	}
}

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		System.out.print(2-scan.nextLong()%2);

	}

}

import java.util.Scanner;

public class Game {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();

		System.out.println(2 - (n % 2));
	}
}

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/* Name of the class has to be "Main" only if the class is public. */
public class bbg
{
	public static int result;

public static ArrayList<Integer> [] graph;

public static int[]cats;

public static int vizitat[];
public static int x;
//public static HashMap<String, Integer> map2;

	public static void main (String[] args) throws java.lang.Exception
{

Scanner input=new Scanner(System.in);

HashMap<Integer, Integer> contor1= new HashMap<Integer, Integer>();
HashMap<Integer, Integer> contor2= new HashMap<Integer, Integer>();

HashMap<Integer, Integer> map= new HashMap<Integer, Integer>();
HashMap<Integer, Integer> map2= new HashMap<Integer, Integer>();
HashMap<String, Integer> combinari= new HashMap<String, Integer>();

		Long n=input.nextLong();
		if(n%2l==0l) System.out.println(2);
		else System.out.println(1);
}

		}

import java.util.Scanner;

public class Game2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		if(n%2==0){

			System.out.println(2);

		}
		else{
			System.out.println(1);
		}
	}

}

import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R342_Exper_Ed_R
{
	FastReader in;
	PrintWriter out;

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

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void solve()
	{
		long n = in.nextLong();
		//n=1,2,3,4,5,6;  1,2,5,8,13,18

		out.println(2 - n % 2);
	}

	//-----------------------------------------------------
	void runWithFiles() {
		in = new FastReader(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Arrays;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Erasyl Abenov
 *
 *
 */
public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
            try (PrintWriter out = new PrintWriter(outputStream)) {
                TaskB solver = new TaskB();
                solver.solve(1, in, out);
            }
    }
}
class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException{
        long n = in.nextLong();
        if(n%2 == 0) out.println(2);
        else out.println(1);
    }
}

class InputReader {
    private final BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public BigInteger nextBigInteger(){
        return new BigInteger(next());
    }
    public long nextLong() {
        return Long.parseLong(next());
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

import java.io.*;
import java.util.*;
public class r {
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	long n = input.nextLong();
	out.println(2 - n%2);
	out.close();
}

public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}

import java.io.*;
import java.util.StringTokenizer;

public class R {

    public static void main(String[] args) {
        Reader reader = new Reader(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        long l = reader.readLong();
        if((l&1) == 1)
            writer.println(1+"");
        else
            writer.println(2+"");

        writer.close();
    }

    public static class Reader{
        BufferedReader br;
        StringTokenizer st;
        public Reader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
        }

        public String readToken(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(IOException e){

                }

            }
            return st.nextToken();

        }
        public String readWord(){
            return readToken();
        }
        public int readInt(){
            return Integer.parseInt(readToken());
        }
        public long readLong(){
            return Long.parseLong(readToken());
        }
    }
}

import java.io.*;
import java.util.*;
public class Main {
void solve (Scanner in, PrintWriter out) {
long n=in.nextLong() ;
if(n%2==0)
{
out.println(2);
}

if(n%2!=0)
{
out.println(1);
}

}
void run() {
Locale.setDefault(Locale.US);
try(
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
){
solve(in, out);
}
}
public static void main (String arqs[]) {
new Main().run();
}
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long numero;
        numero = sc.nextLong();

        if(numero%2!=0){
            System.out.println("1");
        }
        else{
            System.out.println("2");
        }
    }
}
// 1536715569510

public class Solution {
    public static void main(String[] args) {
        java.util.Scanner scanner = new java.util.Scanner(System.in);
        System.out.println(scanner.nextLong() % 2 == 0 ? 2 : 1);
    }
}

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

public class Codeforcescodes {

    /**
     * @param args the command line arguments
     */
    static int mod = 1000 * 1000 * 1000 + 7;
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        long  n = input.nextLong();
        int[] res = {2,1};

        System.out.println(res[(int)(n%2)]);

    }

}

import java.util.*;
public class CF630R {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println(in.nextLong()%2==0?2:1);
	}
}

import java.util.Scanner;
public class bullshit {
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    long l=sc.nextLong();
    System.out.println(l%2==0?2:1);
  }
  // so hard much wow
}

import java.util.Scanner;

public class Problem_630R {
    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        long n = sc.nextLong();
        if(n % 2 == 0 ){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }
    }
}

import java.util.Scanner;

public class Main {
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);

    long n = scan.nextLong();
    if(n % 2L == 0){
      System.out.println("2");
    }
    else{
      System.out.println("1");
    }
  }
}

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

public class Task630R {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        BigInteger n = new BigInteger(s.next());
        System.out.println( n.mod(new BigInteger("2")).intValue() != 0 ? "1" : "2");
    }
}

import java.util.Scanner;

/**
 * Created by andreilupu on 18/02/2016.
 */
public class R {

    public static void main(String[] args) {
        new R();
    }

    public R(){
        solve();
    }

    private void solve() {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int n = Integer.parseInt(s.substring(s.length()-1));
        if(n%2 == 0)
            System.out.println(2);
        else
            System.out.println(1);
    }
}

import java.math.BigInteger;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
    BigInteger b;
        BigInteger a=BigInteger.valueOf(2);
        b=sc.nextBigInteger();
        b=b.mod(a);
        if(b==BigInteger.valueOf(0))
        {
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }
    }
}
// 1536635176092

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

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

    }
}

// 1508894815214

import java.util.Scanner;

public class Game2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		if(n%2==0){

			System.out.println(2);

		}
		else{
			System.out.println(1);
		}
	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class R {
	static void solve(){
		System.out.println(nextLong() % 2 == 0 ? 2 : 1);
	}

	public static void main(String[] args) {
		solve();
		writer.close();
	}

	static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	static StringTokenizer tokenizer = new StringTokenizer("");
	static PrintWriter writer = new PrintWriter(System.out);

	static String next(){
		while(!tokenizer.hasMoreTokens())
			try {
				tokenizer = new StringTokenizer(bf.readLine());
			} catch (Exception e) {
				return null;
			}
		return tokenizer.nextToken();
	}

	static int nextInt(){
		return Integer.parseInt(next());
	}

	static long nextLong(){
		return Long.parseLong(next());
	}

	static double nextDouble(){
		return Double.parseDouble(next());
	}

	static int[] nextIntArr(int n){
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextInt();
		}

		return a;
	}

}

/**
 * @(#)Game.java
 *
 *
 * @author
 * @version 1.00 2016/8/24
 */

import java.util.Scanner;
public class Game {
	public static void main(String[] args){
		Scanner mch = new Scanner(System.in);
		long a = mch.nextLong();
		a = a%2;
		System.out.print(2-a);
	}

}

import java.util.*;

/**
 *
 * @author Fran
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        long l;
        Scanner sc=new Scanner(System.in);
        l=sc.nextLong();

        if(l%2!=0)System.out.println("1");
        else System.out.println("2");

    }

}
// 1508893845081

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner entrada= new Scanner(System.in);
        long  n=0;
        n = entrada.nextLong();
        if(n%2==0){
            System.out.println("2");
        }else{
            System.out.println("1");
        }
        }

    }
// 1536721274561

import java.util.*;
public class ProR {
	static long n;

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		n=in.nextLong();
		System.out.println(n%2==0?2:1);
	}
}

import java.util.Scanner;

/**
 * Created by raiym on 2/18/16.
 */
public class G {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        int m = Integer.parseInt(n.charAt(n.length() - 1) + "");
        if (m % 2 == 1) {
            System.out.println(1);
        } else {
            System.out.println(2);
        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.Vector;
import javafx.util.Pair;

/**
 *
 * @author Ahmad
 */
public class JavaApplication1 {

    public static void main (String[] args) throws IOException, Exception {
       FastReader console = new FastReader();
       long n = console.nextLong();
       if (n%2==0){
           System.out.println("2");
       }
       else {
           System.out.println("1");
       }
 }
}
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;
    }
}

import java.util.Scanner;

public class R {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long N = in.nextLong();
		System.out.println(((N&1) == 0 ? 2 : 1) + "");
		in.close();
	}
}

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner s = new Scanner(System.in);
		long  n = s.nextLong();
		if(n%2 ==0&& n!=1)
			System.out.println(2);
		else System.out.println(1);
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author anand.oza
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        RGame solver = new RGame();
        solver.solve(1, in, out);
        out.close();
    }

    static class RGame {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            n %= 2;
            if (n == 1) {
                out.println(1);
            } else {
                out.println(2);
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner s =new Scanner(System.in);
	String  x=s.next();
	char k;k=x.charAt(x.length()-1);
	if((int )k%2==0)System.out.println("2");
	else System.out.println("1");
	}
}

import java.util.*;
public class Game {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		System.out.println(seer.nextLong()%2L==0?2:1);
	}

}

import java.util.Scanner;

/**
 * Created by JUSTIN on 11/23/17.
 */
public class BeautifulNumber {
    public static void main (String args[]){
        Scanner s = new Scanner(System.in);
        long meme = s.nextLong();
        if (meme % 2 == 0) { //l
            System.out.println(2);
        }
        else {
            System.out.println(1);
        }
    }

}

import java.util.*;
import java.math.*;
public class Main
{
    public static void main (String args[] ) {
        Scanner s = new Scanner(System.in);

		long d=s.nextLong();
		if(d%2==0)
			System.out.println(2);
			else
				System.out.println(1);

}}

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n= in.nextLong();
        System.out.println((long)2 - Math.floorMod(n,2));
    }
}

import java.util.Scanner;
public class bullshit {
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    long l=sc.nextLong();
    System.out.println(l%2==0?2:1);
  }
  // so hard much wow
}

import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        if(n % 2 == 0){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }
    }

}
// 1536679589577

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		long a;
		Scanner in=new Scanner(System.in);
		a=in.nextLong();
		System.out.print(a % 2 == 0 ? 2 : 1);
	}
}

import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.io.*;
import java.util.*;

public class EECR
{

private static StringTokenizer st;

    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }

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

    public static String next()
    {
        return st.nextToken();
    }

    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }

    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        long n = nextLong();
        if (n % 2 == 1)
        {
            System.out.println(1);
        }
        else
        {
            System.out.println(2);
        }
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		QuickScanner in = new QuickScanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskR solver = new TaskR();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskR {
    public void solve(int testNumber, QuickScanner in, PrintWriter out) {
        long n=in.nextLong();
        if(n%2==1)
            out.println(1);
        else
            out.println(2);
    }
}

class QuickScanner {
    BufferedReader in;
    StringTokenizer token;
    String delim;
    public QuickScanner(InputStream inputStream)
    {
        this.in=new BufferedReader(new InputStreamReader(inputStream));
        this.delim=" \n\t";
        this.token=new StringTokenizer("",delim);
    }

    public boolean hasNext()
    {
        while(!token.hasMoreTokens())
        {
            try {
                String s=in.readLine();
                if(s==null) return false;
                token=new StringTokenizer(s,delim);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }
        return true;
    }

    public String next()
    {
        hasNext();
        return token.nextToken();
    }

    public long nextLong()
    {
        return Long.parseLong(next());
    }

}

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

public class test {
	static int INF = 1000000007;

	public static void main(String[] args) {
//		int test = fs.nextInt();
		int test = 1;
		for (int cases = 0; cases < test; cases++) {
			long n = fs.nextLong();
			if (n % 2 != 0) {
				op.print("1");
			} else {
				op.print("2");
			}
			op.flush();
		}

	}

//	static long nCr(long n, long r) {
//		return fact(n) / (fact(r) * fact(n - r));
//	}
//
//	// Returns factorial of n
//	static long fact(long n) {
//		long res = 1;
//		for (long i = 2; i <= n; i++)
//			res = res * i;
//		return res;
//	}

	static long power(long x, long y, long p) {
		long res = 1;
		x = x % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * x) % p;
			y = y >> 1;
			x = (x * x) % p;
		}
		return res;
	}

	static long modInverse(long n, long p) {
		return power(n, p - 2, p);
	}

	static long nCrModPFermat(long n, long r) {
		long ans1 = 1;
		long i = n;
		long k = r;
		while (k > 0) {
			ans1 = ans1 * i;
			i--;
			k--;
		}
		long ans2 = 1;
		while (r > 0) {
			ans2 = ans2 * r;
			r--;
		}
		ans1 = ans1 / ans2;
		return ans1;
	}

	static long facCalc(long total) {
		long ans = 1;
		for (long i = 2; i <= total; i++) {
			ans = mul(ans, i, INF);
		}
		return ans;
	}

	static long mul(long a, long b, long p) {
		return ((a % p) * (b % p)) % p;
	}

	static void sieve() {
		boolean prime[] = new boolean[101];
		Arrays.fill(prime, true);
		prime[1] = false;
		for (int i = 2; i * i <= prime.length - 1; i++) {
			for (int j = i * i; j <= prime.length - 1; j += i) {
				prime[j] = false;
			}
		}
	}

	public static int[] radixSort(int[] f) {
		return radixSort(f, f.length);
	}

	public static int[] radixSort(int[] f, int n) {
		int[] to = new int[n];
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] & 0xffff)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] & 0xffff]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] >>> 16)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] >>> 16]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		return f;
	}

	static void printArray(int ar[]) {
		Arrays.toString(ar);
	}

	static long expmodulo(long a, long b, long c) {
		long x = 1;
		long y = a;
		while (b > 0) {
			if (b % 2 == 1) {
				x = (x * y) % c;
			}
			y = (y * y) % c; // squaring the base
			b /= 2;
		}
		return (long) x % c;
	}

//	static int modInverse(int a, int m) {
//		int m0 = m;
//		int y = 0, x = 1;
//
//		if (m == 1)
//			return 0;
//
//		while (a > 1) {
//			int q = a / m;
//			int t = m;
//			m = a % m;
//			a = t;
//			t = y;
//			y = x - q * y;
//			x = t;
//		}
//		if (x < 0)
//			x += m0;
//		return x;
//	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static void sortMyMapusingValues(HashMap<String, Integer> hm) {

		List<Map.Entry<String, Integer>> capitalList = new LinkedList<>(hm.entrySet());

		Collections.sort(capitalList, new Comparator<Map.Entry<String, Integer>>() {
			public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {
				return (o1.getValue()).compareTo(o2.getValue());
			}
		});
		HashMap<String, Integer> result = new HashMap<>();
		for (Map.Entry<String, Integer> entry : capitalList) {
			result.put(entry.getKey(), entry.getValue());
		}
	}

	static boolean ispowerof2(long num) {
		if ((num & (num - 1)) == 0)
			return true;
		return false;
	}

	static void primeFactors(int n) {
		while (n % 2 == 0) {
			System.out.print(2 + " ");
			n /= 2;
		}
		for (int i = 3; i <= Math.sqrt(n); i += 2) {
			while (n % i == 0) {
				System.out.print(i + " ");
				n /= i;
			}
		}
		if (n > 2)
			System.out.print(n);
	}

	static boolean isPrime(long n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		long sq = (long) Math.sqrt(n);
		for (int i = 5; i <= sq; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	static class Graph {
		HashMap<Integer, LinkedList<Integer>> hm = new HashMap<Integer, LinkedList<Integer>>();

		private void addVertex(int vertex) {
			hm.put(vertex, new LinkedList<>());
		}

		private void addEdge(int source, int dest, boolean bi) {
			if (!hm.containsKey(source))
				addVertex(source);
			if (!hm.containsKey(dest))
				addVertex(dest);
			hm.get(source).add(dest);
			if (bi) {
				hm.get(dest).add(source);
			}
		}

		private boolean uniCycle(int i, HashSet<Integer> visited, int parent) {
			visited.add(i);
			LinkedList<Integer> list = hm.get(i);
			Iterator<Integer> it = list.iterator();
			while (it.hasNext()) {
				Integer integer = (Integer) it.next();
				if (!visited.contains(integer)) {
					if (uniCycle(integer, visited, i))
						return true;
				} else if (integer != parent) {
					return true;
				}
			}
			return false;
		}

		private boolean uniCyclic() {
			HashSet<Integer> visited = new HashSet<Integer>();
			Set<Integer> set = hm.keySet();
			for (Integer integer : set) {
				if (!visited.contains(integer)) {
					if (uniCycle(integer, visited, -1)) {
						return true;
					}
				}
			}
			return false;
		}

		private boolean isbiCycle(int i, HashSet<Integer> visited, HashSet<Integer> countered) {
			if (countered.contains(i))
				return true;
			if (visited.contains(i))
				return false;
			visited.add(i);
			countered.add(i);
			LinkedList<Integer> list = hm.get(i);
			Iterator<Integer> it = list.iterator();
			while (it.hasNext()) {
				Integer integer = (Integer) it.next();
				if (isbiCycle(integer, visited, countered)) {
					return true;
				}
			}
			countered.remove(i);
			return false;
		}

		Boolean isReachable(int s, int d, int k) {
			if (hm.isEmpty()) {
				return false;
			}
			LinkedList<Integer> temp;
			boolean visited[] = new boolean[k];
			LinkedList<Integer> queue = new LinkedList<Integer>();
			visited[s] = true;
			queue.add(s);
			Iterator<Integer> i;
			while (queue.size() != 0) {
				s = queue.poll();
				int n;
				i = hm.get(s).listIterator();

				// Get all adjacent vertices of the dequeued vertex s
				// If a adjacent has not been visited, then mark it
				// visited and enqueue it
				while (i.hasNext()) {
					n = i.next();

					// If this adjacent node is the destination node,
					// then return true
					if (n == d)
						return true;

					// Else, continue to do BFS
					if (!visited[n]) {
						visited[n] = true;
						queue.add(n);
					}
				}
			}

			// If BFS is complete without visited d
			return false;
		}

		private boolean isbiCyclic() {
			HashSet<Integer> visited = new HashSet<Integer>();
			HashSet<Integer> countered = new HashSet<Integer>();
			Set<Integer> set = hm.keySet();
			for (Integer integer : set) {
				if (isbiCycle(integer, visited, countered)) {
					return true;
				}
			}
			return false;
		}
	}

	static class Node {
		Node left, right;
		int data;

		public Node(int data) {
			this.data = data;
		}

		public void insert(int val) {
			if (val <= data) {
				if (left == null) {
					left = new Node(val);
				} else {
					left.insert(val);
				}
			} else {
				if (right == null) {
					right = new Node(val);
				} else {
					right.insert(val);
				}
			}
		}

		public boolean contains(int val) {
			if (data == val) {
				return true;
			} else if (val < data) {
				if (left == null) {
					return false;
				} else {
					return left.contains(val);
				}
			} else {
				if (right == null) {
					return false;
				} else {
					return right.contains(val);
				}
			}
		}

		public void inorder() {
			if (left != null) {
				left.inorder();
			}
			System.out.print(data + " ");
			if (right != null) {
				right.inorder();
			}
		}

		public int maxDepth() {
			if (left == null)
				return 0;
			if (right == null)
				return 0;
			else {
				int ll = left.maxDepth();
				int rr = right.maxDepth();
				if (ll > rr)
					return (ll + 1);
				else
					return (rr + 1);
			}
		}

		public int countNodes() {
			if (left == null)
				return 1;
			if (right == null)
				return 1;
			else {
				return left.countNodes() + right.countNodes() + 1;
			}
		}

		public void preorder() {
			System.out.print(data + " ");
			if (left != null) {
				left.inorder();
			}

			if (right != null) {
				right.inorder();
			}

		}

		public void postorder() {
			if (left != null) {
				left.inorder();
			}

			if (right != null) {
				right.inorder();
			}
			System.out.print(data + " ");

		}

		public void levelorder(Node node) {
			LinkedList<Node> ll = new LinkedList<Node>();
			ll.add(node);
			getorder(ll);

		}

		public void getorder(LinkedList<Node> ll) {
			while (!ll.isEmpty()) {
				Node node = ll.poll();
				System.out.print(node.data + " ");
				if (node.left != null)
					ll.add(node.left);
				if (node.right != null)
					ll.add(node.right);
			}
		}
	}

	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 class Pair {
		int first, second;

		public Pair(int first, int second) {
			this.first = first;
			this.second = second;
		}

	}

	static class Pair2 {
		int first;
		Pair second;

		public Pair2(int first, Pair second) {
			this.first = first;
			this.second = second;
		}

	}

	static class LongPair {
		long first, second;

		public LongPair(long first, long second) {
			this.first = first;
			this.second = second;
		}

	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

	}

	private static final FastReader fs = new FastReader();
	private static final OutputWriter op = new OutputWriter(System.out);
}

import java.util.*;

public class Gameplz {
	static Scanner sc = new Scanner(System.in);
	static long n;
	public static void main(String[] args) {
		n = sc.nextLong();
		n%=2;
		System.out.println(n==0?2:1);
	}

}

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

public class Main {
	public static void main (String[] args) {
	    Scanner input = new Scanner(System.in);

		long n = input.nextLong();
		if(n%2!=0)
		System.out.println(1);
		else
		System.out.println(2);

	}
}

import java.util.Scanner;

public class JavaApplication5 {

    public static void main(String[] args) {
       Scanner in = new Scanner(System.in);
       long n;
       n = in.nextLong();
       System.out.println((n+1)%2+1);

    }
}

import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = 0;
        n = sc.nextLong();
        if (n % 2 != 0) {
            System.out.println(1);
        } else {
            System.out.println(2);
        }
    }

}
// 1536720056360

import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		long n = stdin.nextLong();
		if (n % 2 == 0) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	}
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner entrada= new Scanner(System.in);
        long  n=0;
        n = entrada.nextLong();
        if(n%2==0){
            System.out.println("2");
        }else{
            System.out.println("1");
        }
        }

    }
// 1536721274561

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger n;
        n = sc.nextBigInteger();
        if(n.mod(BigInteger.valueOf(2)).equals(BigInteger.valueOf(0))){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }
    }
}
// 1500320132249

import javafx.scene.shape.SVGPath;
import jdk.nashorn.internal.ir.WhileNode;

import java.util.Arrays;
import java.util.Scanner;

import static java.lang.Math.sqrt;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        long  a;
        a= scanner.nextLong();
        if(a%2==0){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }

       }
}

import java.util.*;
/**
 *
 * @author Pipe
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        long n = entrada.nextLong();

        if(n%2!=0){
            System.out.println("1");
        }else{
            System.out.println("2");
        }

        // TODO code application logic here
    }

}
// 1536761644790

import java.util.Scanner;

public class WorkFile {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        long n = s.nextLong();
        System.out.println((n%2==0) ? 2 : 1);
    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

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

    }
}

// 1508894815214

import java.util.Scanner;

public class sixthrnolR {
    public static void main(String[] args) {
        Scanner in = new Scanner (System.in);
        long n = in.nextLong();
        if(n % 2 == 0 ){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }
    }
}

import java.util.*;
import java.io.*;
public class R{
	static Scanner in = new Scanner(System.in);
	static PrintWriter pw = new PrintWriter(System.out);
	static void Solve(long the){
		long n=in.nextLong();
		if(n%2==1)	pw.print("1");
		else pw.print("2");

	}
	public static void main(String args[]){
		long t=1;
		// t=in.nextInt();
		for(long i=1;i<=t;i++){
			Solve(i);
		}
		pw.close();
	}
}

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

public class Competetive {

	public static void main(String[] args) {
		FastScanner sc=new FastScanner();
		long n=sc.nextLong();
		if(n%2!=0) {
			System.out.println(1);
		}
		else {
			System.out.println(2);
		}

	}

	public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
                                      st=new StringTokenizer(br.readLine());
                              } catch (IOException e) {}
			return st.nextToken();
		}

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

		long nextLong() {
			return Long.parseLong(next());
		}
		String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

	}

}

import java.io.*;
import static java.lang.Math.*;

import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.lang.*;

public class Main {
    final static boolean debug = false;
    final static String fileName = "";
    final static boolean useFiles = false;

    public static void main(String[] args) throws FileNotFoundException {
        PrintWriter writer = new PrintWriter(System.out);
        new Task(new InputReader(System.in), writer).solve();
        writer.close();
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public byte nextByte() {
        return Byte.parseByte(next());
    }
}

class Task {
    public void solve() {
        long n = in.nextLong();
        out.println(2 - n % 2);
    }

    private InputReader in;
    private PrintWriter out;

    Task(InputReader in, PrintWriter out) {
        this.in = in;
        this.out = out;
    }
}

import java.util.Scanner;
public class bullshit {
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    long l=sc.nextLong();
    System.out.println(l%2==0?2:1);
  }
  // so hard much wow
}

import java.util.Scanner;
import java.math.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger n = sc.nextBigInteger();
        n=n.remainder(BigInteger.valueOf(2));
        if(n.intValue()==0){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }

    }
}
// 1536709507310

import java.util.Scanner;

public class Game {

	public static void main(String[] args) {
		System.out.println((new Scanner(System.in).nextLong() % 2 == 1)? "1":"2");
	}
}

import java.io.*;

public class DomX{

    public static void main(String[] args) throws Exception{

        BufferedReader read = new BufferedReader(new InputStreamReader(System.in));

        long n = Long.parseLong(read.readLine());

            System.out.println((n*n) % 2 == 0 ? 2 : 1);
    }
}

/**
 * Created by wobwab on 8/12/2016.
 */
import java.util.*;
public class CF630R {
    public static void main(String[] agrs)
    {
        Scanner sc = new Scanner(System.in);
        System.out.print(2-sc.nextLong()%2);
    }
}

import java.util.Scanner;

public class Game{
	public static void main(String[] args){
		Scanner kbd = new Scanner(System.in);

		long n = kbd.nextLong();

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

//package que_a;

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

public class utkarsh {

    InputStream is;
    PrintWriter out;

    long mod = (long) (1e9 + 7), inf = (long) (3e18);
    boolean SHOW_TIME, debug;

    void solve() {
        //Enter code here utkarsh
        //SHOW_TIME = true;
	//debug = true;
        long n = nl();
        if(n%2 == 0)    out.println(2);
        else    out.println(1);
    }

    long mp(long b, long e) {
        long r = 1;
        while(e > 0) {
            if((e&1) == 1)  r = (r * b) % mod;
            b = (b * b) % mod;
            e >>= 1;
        }
        return r;
    }

    //---------- I/O Template ----------

    public static void main(String[] args) { new utkarsh().run(); }
    void run() {
        is = System.in;
        out = new PrintWriter(System.out);
        long start = System.currentTimeMillis();
        solve();
        long end = System.currentTimeMillis();
        if(SHOW_TIME) out.println("\n" + (end - start) + " ms");
        out.flush();
    }

    byte input[] = new byte[1024];
    int len = 0, ptr = 0;

    int readByte() {
        if(ptr >= len) { ptr = 0;
            try { len = is.read(input); }
            catch(IOException e) { throw new InputMismatchException(); }
            if(len <= 0) { return -1; }
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() {
        int b = readByte();
        while(b != -1 && isSpaceChar(b)) { b = readByte(); }
        return b;
    }

    char nc() { return (char)skip(); }
    String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!isSpaceChar(b)) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    String nLine() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while( !(isSpaceChar(b) && b != ' ') ) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    int ni() {
        int n = 0, b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        if(b == -1) { return -1; }  //no input
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }
    long nl() {
        long n = 0L;    int b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }

    double nd() { return Double.parseDouble(ns()); }
    float nf() { return Float.parseFloat(ns()); }
    int[] na(int n) {
        int a[] = new int[n];
        for(int i = 0; i < n; i++) { a[i] = ni(); }
        return a;
    }
    char[] ns(int n) {
        char c[] = new char[n];
        int i, b = skip();
        for(i = 0; i < n; i++) {
            if(isSpaceChar(b)) { break; }
            c[i] = (char)b; b = readByte();
        } return i == n ? c : Arrays.copyOf(c,i);
    }
}

import java.io.PrintWriter;
import java.lang.String;
import java.util.Scanner;

public class D {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader = new Scanner(System.in);
		PrintWriter writer= new PrintWriter(System.out);
		long n = reader.nextLong();
		long result = 2 - n + n/2 * 2;
		writer.format("%d", result);

//		reader.close();
//
		writer.flush();
		writer.close();

	}

}

import java.util.*;
public class ProR {
	static long n;

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		n=in.nextLong();
		System.out.println(n%2==0?2:1);
	}
}

import java.util.*;

public class zher{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        long s= in.nextLong();
        if (s%2==0) System.out.println(2);
        else System.out.println(1);
    }
}

//package codeforces;

import java.util.Scanner;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeMap;
import java.util.TreeSet;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.Set;

public class q {
	// Integer.bitCount(i); count no of 1 bit in a given number
	static Scanner scn = new Scanner(System.in);
	static int mod = 1000000007,c=0,c1=0;

	public static void main(String[] args)throws Exception {
		// System.out.format("%.10f", ans);char c = sc.next().charAt(0);

			long n=scn.nextLong();
			if(n%2==0)
				System.out.println("2");
			else
				System.out.println("1");
	}

	public static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	public static boolean[] sieveOfEratosthenes(int n) {

		boolean prime[] = new boolean[n + 1];
		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;
			}
		}

		for (int i = 2; i <= n; i++) {
			if (prime[i] == true) {
				// list.add(i);
			}

		}
		return prime;
	}

	public static class Pair implements Comparable {
		int x;
		int y;
		int z;

		Pair(int x, int y, int z) {
			this.x = x;
			this.y = y;
			this.z = z;
		}

		public int compareTo(Object o) {
			Pair pp = (Pair) o;
			if (pp.x == x)
				return 0;
			else if (x > pp.x)
				return 1;
			else
				return -1;
		}

	}

}

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        BigInteger n = in.nextBigInteger();

        if(n.mod(new BigInteger("2")).equals(BigInteger.ZERO)){
            System.out.println("2");
        }else{
            System.out.println("1");
        }
    }
}
// 1536676051069

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

public class ForProblems {

    Random rnd = new Random();

    void solve() throws IOException {

        long n = readLong();
        out.print(n % 2 == 0 ? 2 : 1);

    }

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args){

        new ForProblems().run();
    }

    public void run(){
        try{

            init();
            solve();

            out.close();

        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException{

        while(!tok.hasMoreTokens()){

            try{

                tok = new StringTokenizer(in.readLine());

            } catch (Exception e) {
                return null;
            }
        }

        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }
    void init() throws FileNotFoundException {

        if (ONLINE_JUDGE){
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }
}

import java.util.Scanner;

/**
 * Created by JUSTIN on 11/23/17.
 */
public class BeautifulNumber {
    public static void main (String args[]){
        Scanner s = new Scanner(System.in);
        long meme = s.nextLong();
        if (meme % 2 == 0) {
            System.out.println(2);
        }
        else {
            System.out.println(1);
        }
    }

}

import java.util.*;

public class Game {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();

		if (n % 2 == 0)
			System.out.print("2");
		else
			System.out.print("1");
	}
}

import java.util.*;
public class r {
	public static void main(String[] args){
		Scanner br = new Scanner(System.in);
		long n = br.nextLong();
		if(n%2 == 0){
			System.out.println(2);
		}
		else{
			System.out.println(1);
		}
	}
}

import java.util.Scanner;

/**
 *
 * @author Hai Dang Tran
 */
public class P630R {

    public static void main(String[] args) {
        long n = new Scanner(System.in).nextLong();
        System.out.println(2 - n % 2);
    }

}

import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskR solver = new TaskR();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskR {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long n = in.readLong();
            out.printLine(n % 2 == 0 ? 2 : 1);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public long readLong() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }
}

import java.util.*;
public class CodeForces
{

    public static void main(String[] args)
	{

            Scanner in = new Scanner(System.in);
            long n = in.nextLong();
            if(n%2 == 1) System.out.println(1);
            else System.out.println(2);
        }

}

import java.math.BigInteger;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author modeh
 */
public class theearth {
    public static void main(String[] args) {
        Scanner st=new Scanner(System.in);
     BigInteger num=new BigInteger(st.next());
    BigInteger x= num.remainder(new BigInteger("2"));
     if(x.equals(new BigInteger("0"))){
         System.out.println("2");
     }
     else {
         System.out.println("1");
     }
    }
}

import java.util.Scanner;

public class Problem_630R {
    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        long n = sc.nextLong();
        if(n % 2 == 0 ){
            System.out.println("2");
        }
        else{
            System.out.println("1");
        }
    }
}

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

public class Competetive {

	public static void main(String[] args) {
		FastScanner sc=new FastScanner();
		long n=sc.nextLong();
		long sol=((n*n)+1)/2;
		if(sol%2!=0) {
			System.out.println(1);
		}
		else {
			System.out.println(2);
		}

	}

	public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
                                      st=new StringTokenizer(br.readLine());
                              } catch (IOException e) {}
			return st.nextToken();
		}

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

		long nextLong() {
			return Long.parseLong(next());
		}
		String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

	}

}

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

public class Main {
    void solve(Scanner in, PrintWriter out){
        long a = in.nextLong();
        a = a*a;
        if (a%2>0){
            out.println(1);
        }
        else{
            out.println(2);
        }
    }
    void run(){
        Locale.setDefault(Locale.US);
        try (
                Scanner in = new Scanner(System.in);
                PrintWriter out = new PrintWriter(System.out);
        ){
            solve(in, out);
        }
    }
    public static void main (String args[]){
        new Main().run();
    }
}

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/* Name of the class has to be "Main" only if the class is public. */
public class bbg
{
	public static int result;

public static ArrayList<Integer> [] graph;

public static int[]cats;

public static int vizitat[];
public static int x;
//public static HashMap<String, Integer> map2;

	public static void main (String[] args) throws java.lang.Exception
{

Scanner input=new Scanner(System.in);

HashMap<Integer, Integer> contor1= new HashMap<Integer, Integer>();
HashMap<Integer, Integer> contor2= new HashMap<Integer, Integer>();

HashMap<Integer, Integer> map= new HashMap<Integer, Integer>();
HashMap<Integer, Integer> map2= new HashMap<Integer, Integer>();
HashMap<String, Integer> combinari= new HashMap<String, Integer>();

		Long n=input.nextLong();
		if(n==2l) System.out.println(2);
		else System.out.println(1);
}

		}

import java.io.PrintWriter;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.*;

public class Main {
    public static PrintWriter out;

    public static void main(String[] args) {

        MyScanner ms = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        long i = ms.nextInt();

        if(i%2==0) {
            out.println(2);
            System.out.println(2);
        }
        else {
            out.println(1);

        }

        out.close();

    }
    public static class MyScanner  {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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;
        }

    }
}

import java.util.Scanner;

public class ProblemR {
	public static void main(String[] args) {
		Scanner scan= new Scanner(System.in);
		long a = scan.nextInt();
		if(a%2==1){
			System.out.print(a);

		}else{
			System.out.println("2");
		}

	}
}

import java.util.Scanner;

public class ProblemR {
	public static void main(String[] args) {
		Scanner scan= new Scanner(System.in);
		int a = scan.nextInt();
		if(a==1){
			System.out.print(a);

		}else{
			System.out.println("2");
		}

	}
}

import java.util.Scanner;
public class Main {

    public static void main(String[] args) {long n;
      Scanner s =new Scanner(System.in);
      n=s.nextLong();
      if(n%2==0){
          System.out.println("1");
      }else System.out.println("2");
    }

}

import java.util.*;
public class Game {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		System.out.println(seer.nextInt()==2?2:1);
	}

}

import java.util.*;
public class Game
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
if(n % 2 == 0)
{
    System.out.println(1);
}
else
{
    System.out.println(2);
}
}
}

import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 * Created by JUSTIN on 2/23/17.
 */
public class cowqueue extends IOException{
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int numberoflines = s.nextInt();
        int possiblesquarecount = 0;

        int[] array = new int[numberoflines];

        for (int i = 1; i <= numberoflines; i++) { //i stands for the row number

            if (i % 2 != 0) { //checks if it is an odd line or even line
                for (int m = 1; m <= numberoflines; m++) { //checks the individual tile
                    if (m % 2 != 0) {
                        possiblesquarecount++;
                    }
                }
            }

            else {
                for (int m = 1; m <= numberoflines; m++) { //checks the individual tile
                    if (m % 2 == 0) {
                        possiblesquarecount++;
                    }
                }

            }

        }
        System.out.println(possiblesquarecount);

    }

}

import java.util.Scanner;

/**
 * Created by JUSTIN on 11/23/17.
 */
public class BeautifulNumber {
    public static void main (String args[]){
        Scanner s = new Scanner(System.in);
        int meme = s.nextInt();
        meme = meme % 2;
        switch (meme) {
            case 0:
                System.out.println(1);
                break;
            case 1:
                System.out.print(2);
                break;

        }

    }

}

import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R342_Exper_Ed_R
{
	FastReader in;
	PrintWriter out;

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

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void solve()
	{
		long n = in.nextLong();
		//n=1,2,3,4,5,6;  1,2,5,8,13,18

		out.println(n % 2);
	}

	//-----------------------------------------------------
	void runWithFiles() {
		in = new FastReader(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}

import java.util.*;
import java.lang.*;
import java.awt.*;
import java.math.*;

public class R{

	public static void main(String[] args){
		//long t= System.currentTimeMillis();
		Scanner in = new Scanner(System.in);
		long n= in.nextLong(); //points

		if(n==1)
			System.out.println(1);
		else
			System.out.println(2);

		//wetShark(list);

		//System.out.println(Arrays.toString(list));
	}
}

import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskR solver = new TaskR();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskR {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long n = in.readLong();
            out.printLine(n == 2 ? 2 : 1);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public long readLong() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }
}

/**
 * @(#)Game.java
 *
 *
 * @author
 * @version 1.00 2016/8/24
 */
import java.util.*;
public class Game {
    public static void main(String[] args) {
    	Scanner kbd = new Scanner(System.in);
    	int n = kbd.nextInt();
    	if(n==1){
    		System.out.print(1);
    	}else{
    		System.out.print(2);
    	}
    }
}

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

public class Main {

	void solve(Scanner in, PrintWriter out) {
		long n=in.nextLong();
		out.println(n);

	}

	void run() {
		Locale.setDefault(Locale.US);
		try (
				Scanner in=new Scanner(System.in);
				PrintWriter out = new PrintWriter(System.out);
				){
			solve(in,out);
		}

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

import java.io.PrintWriter;
import java.lang.String;
import java.util.Scanner;

public class D {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader = new Scanner(System.in);
		PrintWriter writer= new PrintWriter(System.out);
		long n = reader.nextLong();
		long result = n/2;
		writer.format("%d", result);

//		reader.close();
//
		writer.flush();
		writer.close();

	}

}

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
double d=sc.nextDouble();
if (d%2==0)
	System.out.print(2);
else
	System.out.print(1);
	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author P Marecki
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskR solver = new TaskR();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskR {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long l = in.nextLong();
            if (l == 2L) out.println(2);
            else out.println(1);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}

import java.util.Scanner;

public class Game {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long total = (long)(Math.ceil(n/2.0)*Math.ceil(n/2.0) +Math.ceil((n-1)/2.0)*Math.ceil((n-1)/2.0));
	   if(total%2==1){
		   System.out.println(1);
	   }
	   else
		   System.out.println(2);
	}

}

import java.util.*;
public class CF630R {
    public static void main(String[] agrs)
    {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextInt();
        if((n*(long)Math.ceil(n/2.0))%2==1)
            System.out.print(1);
        else
            System.out.print(2);
    }
}

import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = 0;
        n = sc.nextInt();
        if (n == 1) {
            System.out.println(1);
        } else if (n == 2) {
            System.out.println(2);

        }
    }

}
// 1536717423017

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
       Scanner leer= new Scanner(System.in);
      int n=0;

        while(leer.hasNextInt()){
        n= leer.nextInt();
        if (n<=0){
        System.exit(0);
        }
        else{
            if(n%2!=0){
            System.out.println("1");
        }
        else{
            System.out.println("2");
             }

            }
        }

}
}
// 1508913093764

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
       Scanner leer= new Scanner(System.in);
      int p=2,a=1;

        while(leer.hasNextInt()){
            int n=0;
            n= leer.nextInt();

            if (n>0){
                if(n%2!=0){
                    System.out.println(a);
                }
                else{
                    System.out.println(p);
                }
            }
            else{
            System.exit(0);
            }
        }
    }

}

// 1508912366273

import java.util.*;
public class Game{
	public static void main(String [] args){
		Scanner kbd = new Scanner(System.in);
		long input;
		int flag;
		input = kbd.nextLong();
		if((input >= 1) && (input <= 100000000)){
			if((input % 2) == 0){
				flag = 2;
				}else{
					flag = 1;
				}
		System.out.println(flag);
		}
	}
}

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        Scanner leer= new Scanner(System.in);
        int n,p=2,a=1;

        n = leer.nextInt();
        if(n<0){
            System.exit(0);
        }
        else{
        if(n%2!=0){
            System.out.println(a);
            System.out.println("asd"+n%2);
        }
        else{
            System.out.println(p);
            System.out.println("asd"+n%2);
            }

        }
    }

}

// 1508910357962

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
       Scanner leer= new Scanner(System.in);
      int n=0;

        while(leer.hasNextInt()){
        n= leer.nextInt();
            if(n%2!=0){
            System.out.println("1");
        }
        else{
            System.out.println("2");
             }

            }
        }

}
// 1508912986588

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Double n;
        n = sc.nextDouble();
        n%=2;
        if(n==1)
            System.out.println("1");
        else
            System.out.println("2");
    }

}
// 1536799163362

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
       Scanner leer= new Scanner(System.in);
       while(leer.hasNextInt()){
            int n=0;
            n= leer.nextInt();

            if (n>0){
                if(n%2!=0){
                    System.out.println("1");
                }
                else{
                    System.out.println("2");
                }
            }
            else{
            System.exit(0);
            }
        }
    }

}

// 1508912552010

import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        float n = 0;
        n = sc.nextFloat();
        if (n % 2 != 0) {
            System.out.println(1);
        } else if (n % 2 == 0) {
            System.out.println(2);

        }
    }

}
// 1536717896685

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
       Scanner leer= new Scanner(System.in);
      int p=2,a=1;

        while(leer.hasNextInt()){
            int n=0;
            n= leer.nextInt();

            if (n>0){
                if(n%2==0){
                    System.out.println(a);
                }
                else{
                    System.out.println(p);
                }
            }
            else{
            System.exit(0);
            }
        }
    }

}

// 1508912282559

import java.util.*;
/**
 *
 * @author Pipe
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        double n = entrada.nextDouble();

        if(n%2!=0){
            System.out.println("1");
        }else{
            System.out.println("2");
        }

        // TODO code application logic here
    }

}
// 1536761565324

import java.util.Scanner;

/**
 *
 * @author Nicolás Pérez Garay
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
       Scanner leer= new Scanner(System.in);
        int n;
       while(leer.hasNextInt()){
            n= leer.nextInt();
            if(n%2!=0){
                System.out.println("1");
        }
            else{
                System.out.println("2");
             }

            }
        }

}
// 1508913995331

import java.io.*;
import java.util.*;
public class Main {
void solve (Scanner in, PrintWriter out) {
	long n=in.nextLong();
	if(n%2!=0)
	{
		out.println(1);
	}
	else
	{
		out.println(1);
	}
}
void run() {
	Locale.setDefault(Locale.US);
	try(
			Scanner in = new Scanner(System.in);
			PrintWriter out = new PrintWriter(System.out);
			){
		solve(in, out);
	}
}
public static void main (String arqs[]) {
	new Main().run();
}
}

import java.io.*;
import java.util.*;
public class Main {
void solve (Scanner in, PrintWriter out) {
	int n=in.nextInt();
	if(n%2!=0)
	{
		out.println(1);
	}
	else
	{
		out.println(1);
	}
}
void run() {
	Locale.setDefault(Locale.US);
	try(
			Scanner in = new Scanner(System.in);
			PrintWriter out = new PrintWriter(System.out);
			){
		solve(in, out);
	}
}
public static void main (String arqs[]) {
	new Main().run();
}
}

import java.math.BigInteger;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author modeh
 */
public class theearth {
    public static void main(String[] args) {
        Scanner st=new Scanner(System.in);
     BigInteger num=new BigInteger(st.next());
    BigInteger x= num.remainder(new BigInteger("2"));
     if(x==new BigInteger("0")){
         System.out.println("2");
     }
     else {
         System.out.println("1");
     }
    }
}

/**
 * @(#)Game.java
 *
 *
 * @author
 * @version 1.00 2016/8/23
 */

import java.util.Scanner;

public class Game {

    public static void main(String[]args) {

    	Scanner in = new Scanner(System.in);
    	int n = in.nextInt();

    	System.out.println(n);

    }

}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 2/18/16.
 * 11:43 PM
 */
public class Task_R {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);
		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter(System.out);
		}
		solve();
		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();
		System.err.println("Time = " + (timeEnd - timeBegin));
	}

	/*
	 * Start Solution Here
	 */

	private void solve() throws IOException {
		long n = Reader.nextLong();
		if(n==1 )out.println(1);
		else out.println(2);

	}

	public static void main(String[] args) throws IOException {
		new Task_R().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextChar() throws IOException {
			return reader.read();
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}
	}
}