// Задача "Забавная последовательность"
// 10-ая Интернет-олимпиада сезона 2006-2007, базовый уровень
// Автор задачи: Федор Царев, tsarev@rain.ifmo.ru
// Автор решения: Федор Царев, tsarev@rain.ifmo.ru

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

public class sequence_ft implements Runnable {

	private Scanner in;
	private PrintWriter out;

	private final static int MAXN = 2000;

	private void myAssert(boolean e, String mes) {
		if (!e) {
			throw new Error("Assertion failure!!! " + mes);
		}
	}

	private void solve() throws IOException {
		int n = in.nextInt();
		myAssert(1 <= n && n <= (int) 1e5, "n < 1 || n > 1e5");
		TreeSet<Integer> seq = new TreeSet<Integer>();
		int cur = 1;
		for (int i = 2; i <= n; i++) {
			seq.add(cur);
			int next = -1;
			if (seq.contains(i)) {
				next = cur + 3;	
			} else {         
				next = cur + 2;
			}
			cur = next;			
		}
		out.println(cur);
	}

	public void run() {
		try {
			solve();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		} finally {
			out.close();
		}
	}
	
	private sequence_ft(String name) {
		try {
			in = new Scanner(new File(name + ".in"));
			out = new PrintWriter(new FileWriter(name + ".out"));	
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(239);
		}
	}

	public static void main(String[] args) {
		(new Thread(new sequence_ft("sequence"))).start();
	}
}
