/* L3 = 1 Ln = Ln-1 + n - 2 */ import java.util.Scanner; class Test { public static int aba(int n) { if(n == 3) { return 1; } else { return aba(n-1) + n - 2; } } public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); int l = in.nextInt(); int ans = aba(l); System.out.println(ans); } }