#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long MAX = 100005;
const long double PI = 3.14159265359;
const long double G = 9.807;
const long long INF = 1e18;
const long double EPS = 1e-6;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool isprime(long long a) {
  if (a == 2) return 1;
  if (!(a & 1)) return 0;
  for (long long i = 3; i * i <= a; i += 2)
    if (a % i == 0) return 0;
  return 1;
}
long long mpow(long long base, long long exponent, long long modulus) {
  if (modulus == 1) return 0;
  long long result = 1;
  base = base % modulus;
  while (exponent) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
long long minv(long long a, long long mod) {
  long long _gcd = gcd(a, mod);
  assert(_gcd == 1);
  return mpow(a, mod - 2, mod);
}
long long ncr(long long n, long long k) {
  if (k > n) return 0;
  k = min(k, n - k);
  long long l = n;
  long long r = 1;
  long long ret = 1;
  for (; l > n - k; --l) {
    ret *= l;
    while (r <= k and ret % r == 0) {
      ret /= r;
      ++r;
    }
  }
  return ret;
}
long long n;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  long long ans = ncr(n, 5) + ncr(n, 6) + ncr(n, 7);
  cout << ans;
  return 0;
}

### Prompt

Generate a CPP solution to 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 long MOD = 1000000007;
const long long MAX = 100005;
const long double PI = 3.14159265359;
const long double G = 9.807;
const long long INF = 1e18;
const long double EPS = 1e-6;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool isprime(long long a) {
  if (a == 2) return 1;
  if (!(a & 1)) return 0;
  for (long long i = 3; i * i <= a; i += 2)
    if (a % i == 0) return 0;
  return 1;
}
long long mpow(long long base, long long exponent, long long modulus) {
  if (modulus == 1) return 0;
  long long result = 1;
  base = base % modulus;
  while (exponent) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
long long minv(long long a, long long mod) {
  long long _gcd = gcd(a, mod);
  assert(_gcd == 1);
  return mpow(a, mod - 2, mod);
}
long long ncr(long long n, long long k) {
  if (k > n) return 0;
  k = min(k, n - k);
  long long l = n;
  long long r = 1;
  long long ret = 1;
  for (; l > n - k; --l) {
    ret *= l;
    while (r <= k and ret % r == 0) {
      ret /= r;
      ++r;
    }
  }
  return ret;
}
long long n;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  long long ans = ncr(n, 5) + ncr(n, 6) + ncr(n, 7);
  cout << ans;
  return 0;
}

```