import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int fctrl(int n){ if (n == 0) return 1; else return(n * fctrl(n-1)); } static long countArray(int n, int k, int x) { long count = 0; if((n>=3) && (k>=2) && (x>=1)) { int newn = n-1; count = fctrl(n-2); return count+countArray(newn,k,x); } else { return count; } } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int x = in.nextInt(); long answer = countArray(n, k, x); System.out.println(answer); in.close(); } }