import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int bounce = sc.nextInt();
System.out.println("The next number for the number " + bounce + " is " + (bounce + 1) + ".");
System.out.println("The previous number for the number " + bounce + " is " + (bounce - 1) + ".");
}
}