#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
long long int inf = 0x3f3f3f3f3f3f3f3f;
const long long int mod = 1e9 + 7;
const long long int mx = 5 * 1000000;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long double f1 = 1;
  long double f2 = 1;
  long double f3 = 1;
  long double f5 = 120, f6 = 1, f7 = 1;
  f6 = f5 * 6;
  f7 = f6 * 7;
  for (long long int i = n - 5 + 1; i <= n; i++) f1 *= i;
  for (long long int i = n - 6 + 1; i <= n; i++) f2 *= i;
  for (long long int i = n - 7 + 1; i <= n; i++) f3 *= i;
  long double ans = 0;
  ans += f1 / f5 + f2 / f6 + f3 / f7;
  cout << (long long int)ans << endl;
}

### Prompt

Create a solution in Cpp for the following problem:

One company of IT City decided to create a group of innovative developments consisting from 5 to 7 people and hire new employees for it. After placing an advertisment the company received n resumes. Now the HR department has to evaluate each possible group composition and select one of them. Your task is to count the number of variants of group composition to evaluate.

Input

The only line of the input contains one integer n (7 ≤ n ≤ 777) — the number of potential employees that sent resumes.

Output

Output one integer — the number of different variants of group composition.

Examples

Input

7


Output

29

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
long long int inf = 0x3f3f3f3f3f3f3f3f;
const long long int mod = 1e9 + 7;
const long long int mx = 5 * 1000000;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long double f1 = 1;
  long double f2 = 1;
  long double f3 = 1;
  long double f5 = 120, f6 = 1, f7 = 1;
  f6 = f5 * 6;
  f7 = f6 * 7;
  for (long long int i = n - 5 + 1; i <= n; i++) f1 *= i;
  for (long long int i = n - 6 + 1; i <= n; i++) f2 *= i;
  for (long long int i = n - 7 + 1; i <= n; i++) f3 *= i;
  long double ans = 0;
  ans += f1 / f5 + f2 / f6 + f3 / f7;
  cout << (long long int)ans << endl;
}

```