import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n_1 = sc.nextInt(); if(n_1 >= 2 || 3 / n_1 != 0){ System.out.println(n_1 + 1); }else if(n_1 >= 2 || n_1 / 2 == 0){ System.out.println(n_1); } } }