import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().solve(); } void solve() { System.out.println(0x00000001^(sc.nextInt())); } }