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

class Toggle2 {
	public static boolean state = true;
	public void off() { state = false; }
	public void activate() { state = !state; }
}

class NthToggle2 extends Toggle2 {
	int count_max = 0;
	int counter = 0;

	public NthToggle2(int max_counter) {
		this.count_max = max_counter;
		this.counter = 0;
	}
	public void activate() {
		if (++this.counter >= this.count_max) {
			super.activate();
			this.counter = 0;
		}
	}
}

public class methcall2 {
	public static void main(String args[]) throws IOException {
		int n = Integer.parseInt(args[0]);

		Toggle2[] toggles = new Toggle2[n];
		for (int i=0; i<n; i++) {
			toggles[i] = (i % 4 != 0 ? new Toggle2() : new NthToggle2(i / 4));
		}
		for (int i = 0; i < n * 1000; i += 3) {
			Toggle2 t = toggles[i % n];
			if (i % 2 != 0) t.off();
			t.activate();
			if ((i + 3) % 4 == 0) t.off();
			t.activate();
		}
		System.out.println(Toggle2.state ? "true" : "false");
	}
}
