import java.io.*; import java.util.*; public class Main_yukicoder831_1 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); Deque q = new ArrayDeque<>(n); for (int i = 1; i < n; i++) { q.add(i); } Deque ans = new ArrayDeque<>(n); ans.add(0); while (!q.isEmpty()) { int last = ans.getLast(); int first = ans.getFirst(); int large = q.getLast(); int small = q.getFirst(); int diff1 = Math.abs(large - last); int diff2 = Math.abs(large - first); int diff3 = Math.abs(small - last); int diff4 = Math.abs(small - first); if (diff1 >= diff2 && diff1 >= diff3 && diff1 >= diff4) { ans.addLast(large); q.removeLast(); } else if (diff2 >= diff1 && diff2 >= diff3 && diff2 >= diff4) { ans.addFirst(large); q.removeLast(); } else if (diff3 >= diff1 && diff3 >= diff2 && diff3 >= diff4) { ans.addLast(small); q.removeFirst(); } else { ans.addFirst(small); q.removeFirst(); } } List list = new ArrayList<>(ans); long cost = 0; for (int i = 0; i < n; i++) { int ii = list.get(i) + 1; int jj = list.get((i + 1) % n) + 1; cost += ii * jj + jj - ii; } // pr.println(list); pr.println(cost); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } } }