#include <bits/stdc++.h>
using namespace std;
const int base = (int)1e4;
struct Bignum {
  int nd, d[55];
  Bignum() {
    nd = 0;
    memset(d, 0, sizeof d);
  }
  Bignum(long long x) {
    nd = 0;
    memset(d, 0, sizeof d);
    if (x == 0) nd++;
    while (x > 0) {
      d[nd++] = x % base;
      x /= base;
    }
  }
  Bignum(const Bignum &x) {
    memset(d, 0, sizeof d);
    nd = x.nd;
    for (int i = 0, _n = (nd); i < _n; i = i + 1) d[i] = x.d[i];
  }
  void operator+=(const Bignum &x) {
    int ND = nd;
    nd = 0;
    int c = 0;
    for (int i = 0, _n = (max(ND, x.nd)); i < _n; i = i + 1) {
      int a = i < ND ? d[i] : 0;
      int b = i < x.nd ? x.d[i] : 0;
      if (a + b + c >= base) {
        d[nd++] = a + b + c - base;
        c = 1;
      } else {
        d[nd++] = a + b + c;
        c = 0;
      }
      assert(nd < 55);
    }
    while (c > 0) {
      d[nd++] = c % base;
      c /= base;
      assert(nd < 55);
    }
    while (nd > 1 && d[nd - 1] == 0) nd--;
  }
  Bignum operator+(const Bignum &x) const {
    Bignum c = *this;
    c += x;
    return (c);
  }
  void operator-=(const Bignum &x) {
    assert(*this >= x);
    int ND = nd;
    nd = 0;
    int c = 0;
    for (int i = 0, _n = (ND); i < _n; i = i + 1) {
      int a = d[i];
      int b = i < x.nd ? x.d[i] : 0;
      if (a >= b + c) {
        d[nd++] = a - b - c;
        c = 0;
      } else {
        d[nd++] = a - b - c + base;
        c = 1;
      }
    }
    while (nd > 1 && d[nd - 1] == 0) nd--;
  }
  Bignum operator*(int k) const {
    Bignum res;
    int c = 0;
    for (int i = 0, _n = (nd); i < _n; i = i + 1) {
      res.d[res.nd++] = (d[i] * k + c) % base;
      c = (d[i] * k + c) / base;
    }
    while (c > 0) {
      res.d[res.nd++] = c % base;
      c /= base;
    }
    while (res.nd > 1 && res.d[res.nd - 1] == 0) res.nd--;
    return (res);
  }
  Bignum operator/(int k) const {
    Bignum res;
    int rem = 0;
    for (int i = (nd - 1), _a = (0); i >= _a; i = i - 1) {
      res.d[res.nd++] = (rem * base + d[i]) / k;
      rem = (rem * base + d[i]) % k;
    }
    reverse(res.d, res.d + res.nd);
    while (res.nd > 1 && res.d[res.nd - 1] == 0) res.nd--;
    return (res);
  }
  int operator%(int k) const {
    int res = 0;
    for (int i = (nd - 1), _a = (0); i >= _a; i = i - 1)
      res = (res * base + d[i]) % k;
    return (res);
  }
  int cmp(const Bignum &x) const {
    if (nd != x.nd) return ((nd > x.nd) - (nd < x.nd));
    for (int i = (nd - 1), _a = (0); i >= _a; i = i - 1)
      if (d[i] != x.d[i]) return ((d[i] > x.d[i]) - (d[i] < x.d[i]));
    return (0);
  }
  void print(void) const {
    printf("%d", d[nd - 1]);
    for (int i = (nd - 2), _a = (0); i >= _a; i = i - 1) printf("%04d", d[i]);
    printf("\n");
  }
  bool operator<(const Bignum &a) const { return (cmp(a) < 0); }
  bool operator>(const Bignum &a) const { return (cmp(a) > 0); }
  bool operator<=(const Bignum &a) const { return (cmp(a) <= 0); }
  bool operator>=(const Bignum &a) const { return (cmp(a) >= 0); }
  bool operator==(const Bignum &a) const { return (cmp(a) == 0); }
  bool operator!=(const Bignum &a) const { return (cmp(a) != 0); }
};
Bignum comb(int k, int n) {
  Bignum res = 1;
  for (int i = 0, _n = (k); i < _n; i = i + 1) res = res * (n - i);
  for (int i = 0, _n = (k); i < _n; i = i + 1) res = res / (i + 1);
  return (res);
}
int main(void) {
  int n;
  cin >> n;
  (comb(5, n) + comb(6, n) + comb(7, n)).print();
  return 0;
}

### Prompt

Please create a solution in CPP 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 int base = (int)1e4;
struct Bignum {
  int nd, d[55];
  Bignum() {
    nd = 0;
    memset(d, 0, sizeof d);
  }
  Bignum(long long x) {
    nd = 0;
    memset(d, 0, sizeof d);
    if (x == 0) nd++;
    while (x > 0) {
      d[nd++] = x % base;
      x /= base;
    }
  }
  Bignum(const Bignum &x) {
    memset(d, 0, sizeof d);
    nd = x.nd;
    for (int i = 0, _n = (nd); i < _n; i = i + 1) d[i] = x.d[i];
  }
  void operator+=(const Bignum &x) {
    int ND = nd;
    nd = 0;
    int c = 0;
    for (int i = 0, _n = (max(ND, x.nd)); i < _n; i = i + 1) {
      int a = i < ND ? d[i] : 0;
      int b = i < x.nd ? x.d[i] : 0;
      if (a + b + c >= base) {
        d[nd++] = a + b + c - base;
        c = 1;
      } else {
        d[nd++] = a + b + c;
        c = 0;
      }
      assert(nd < 55);
    }
    while (c > 0) {
      d[nd++] = c % base;
      c /= base;
      assert(nd < 55);
    }
    while (nd > 1 && d[nd - 1] == 0) nd--;
  }
  Bignum operator+(const Bignum &x) const {
    Bignum c = *this;
    c += x;
    return (c);
  }
  void operator-=(const Bignum &x) {
    assert(*this >= x);
    int ND = nd;
    nd = 0;
    int c = 0;
    for (int i = 0, _n = (ND); i < _n; i = i + 1) {
      int a = d[i];
      int b = i < x.nd ? x.d[i] : 0;
      if (a >= b + c) {
        d[nd++] = a - b - c;
        c = 0;
      } else {
        d[nd++] = a - b - c + base;
        c = 1;
      }
    }
    while (nd > 1 && d[nd - 1] == 0) nd--;
  }
  Bignum operator*(int k) const {
    Bignum res;
    int c = 0;
    for (int i = 0, _n = (nd); i < _n; i = i + 1) {
      res.d[res.nd++] = (d[i] * k + c) % base;
      c = (d[i] * k + c) / base;
    }
    while (c > 0) {
      res.d[res.nd++] = c % base;
      c /= base;
    }
    while (res.nd > 1 && res.d[res.nd - 1] == 0) res.nd--;
    return (res);
  }
  Bignum operator/(int k) const {
    Bignum res;
    int rem = 0;
    for (int i = (nd - 1), _a = (0); i >= _a; i = i - 1) {
      res.d[res.nd++] = (rem * base + d[i]) / k;
      rem = (rem * base + d[i]) % k;
    }
    reverse(res.d, res.d + res.nd);
    while (res.nd > 1 && res.d[res.nd - 1] == 0) res.nd--;
    return (res);
  }
  int operator%(int k) const {
    int res = 0;
    for (int i = (nd - 1), _a = (0); i >= _a; i = i - 1)
      res = (res * base + d[i]) % k;
    return (res);
  }
  int cmp(const Bignum &x) const {
    if (nd != x.nd) return ((nd > x.nd) - (nd < x.nd));
    for (int i = (nd - 1), _a = (0); i >= _a; i = i - 1)
      if (d[i] != x.d[i]) return ((d[i] > x.d[i]) - (d[i] < x.d[i]));
    return (0);
  }
  void print(void) const {
    printf("%d", d[nd - 1]);
    for (int i = (nd - 2), _a = (0); i >= _a; i = i - 1) printf("%04d", d[i]);
    printf("\n");
  }
  bool operator<(const Bignum &a) const { return (cmp(a) < 0); }
  bool operator>(const Bignum &a) const { return (cmp(a) > 0); }
  bool operator<=(const Bignum &a) const { return (cmp(a) <= 0); }
  bool operator>=(const Bignum &a) const { return (cmp(a) >= 0); }
  bool operator==(const Bignum &a) const { return (cmp(a) == 0); }
  bool operator!=(const Bignum &a) const { return (cmp(a) != 0); }
};
Bignum comb(int k, int n) {
  Bignum res = 1;
  for (int i = 0, _n = (k); i < _n; i = i + 1) res = res * (n - i);
  for (int i = 0, _n = (k); i < _n; i = i + 1) res = res / (i + 1);
  return (res);
}
int main(void) {
  int n;
  cin >> n;
  (comb(5, n) + comb(6, n) + comb(7, n)).print();
  return 0;
}

```