#include <bits/extc++.h>

template <uint32_t Modulus>
struct modular {
  static_assert(int(Modulus) > 0, "Modulus must be in the range [1, 2^31)");
  static constexpr int modulus() { return Modulus; }

  modular() : v(0) {}
  modular(int64_t x) : v(x % Modulus) {
    if (int(v) < 0) v += Modulus;
  }

  explicit operator int() const { return v; }
  modular& operator++() { return ++v == Modulus ? v = 0 : 0, *this; }
  modular& operator--() { return --(v ? v : v = Modulus), *this; }
  modular operator+() const { return *this; }
  modular operator-() const {
    modular res;
    res.v = v ? Modulus - v : 0;
    return res;
  }
  modular& operator*=(modular b) {
    v = uint64_t(v) * b.v % Modulus;
    return *this;
  }
  modular& operator/=(modular b) {
    auto [x, gcd] = extgcd(b.v, Modulus);
    assert(gcd == 1);
    return *this *= x;
  }
  modular& operator+=(modular b) {
    v += b.v - Modulus;
    if (int(v) < 0) v += Modulus;
    return *this;
  }
  modular& operator-=(modular b) {
    v -= b.v;
    if (int(v) < 0) v += Modulus;
    return *this;
  }

  friend modular operator++(modular& a, int) {
    return std::exchange(a, ++modular(a));
  }
  friend modular operator--(modular& a, int) {
    return std::exchange(a, --modular(a));
  }
  friend modular operator*(modular a, modular b) { return a *= b; }
  friend modular operator/(modular a, modular b) { return a /= b; }
  friend modular operator+(modular a, modular b) { return a += b; }
  friend modular operator-(modular a, modular b) { return a -= b; }
  friend std::istream& operator>>(std::istream& is, modular& b) {
    int64_t x;
    return is >> x, b = x, is;
  }
  friend std::ostream& operator<<(std::ostream& os, modular b) {
    return os << b.v;
  }
  friend bool operator==(modular a, modular b) { return a.v == b.v; }
  friend bool operator!=(modular a, modular b) { return a.v != b.v; }

 private:
  static std::pair<int, int> extgcd(int a, int b) {
    std::array x{1, 0};
    while (b) {
      int q = a / b;
      std::swap(x[0] -= q * x[1], x[1]);
      std::swap(a -= q * b, b);
    }
    return {x[0], a};
  }

  uint32_t v;
};

template <class T, class U, class BinaryOperation = std::multiplies<>>
constexpr T power(T a, U n, T init = 1,
                  BinaryOperation binary_op = BinaryOperation{}) {
  static_assert(std::is_integral_v<U> and not std::is_same_v<U, bool>);
  assert(n >= 0);
  while (n) {
    if (n & 1) init = binary_op(init, a);
    if (n >>= 1) a = binary_op(a, a);
  }
  return init;
}

using namespace std;

template <class T>
vector<T> operator-(vector<T> a) {
  for (auto&& e : a) e = -e;
  return a;
}
template <class T>
vector<T>& operator+=(vector<T>& a, const vector<T>& b) {
  a.resize(max(size(a), size(b)));
  for (int i = 0; i < (int)size(b); ++i) a[i] += b[i];
  return a;
}
template <class T>
vector<T> operator+(vector<T> a, const vector<T>& b) {
  return a += b;
}
template <class T>
vector<T>& operator-=(vector<T>& a, const vector<T>& b) {
  a.resize(max(size(a), size(b)));
  for (int i = 0; i < (int)size(b); ++i) a[i] -= b[i];
  return a;
}
template <class T>
vector<T> operator-(vector<T> a, const vector<T>& b) {
  return a -= b;
}
template <class T>
vector<T>& operator<<=(vector<T>& a, size_t n) {
  return a.insert(begin(a), n, 0), a;
}
template <class T>
vector<T> operator<<(vector<T> a, size_t n) {
  return a <<= n;
}
template <class T>
vector<T>& operator>>=(vector<T>& a, size_t n) {
  return a.erase(begin(a), begin(a) + min(size(a), n)), a;
}
template <class T>
vector<T> operator>>(vector<T> a, size_t n) {
  return a >>= n;
}
template <class T>
vector<T> operator*(const vector<T>& a, const vector<T>& b) {
  if (empty(a) or empty(b)) return {};
  vector<T> res(size(a) + size(b) - 1);
  for (int i = 0; i < (int)size(a); ++i)
    for (int j = 0; j < (int)size(b); ++j) res[i + j] += a[i] * b[j];
  return res;
}
template <class T>
vector<T>& operator*=(vector<T>& a, const vector<T>& b) {
  return a = a * b;
}
template <class T>
vector<T> inverse(const vector<T>& a) {
  assert(not empty(a) and not(a[0] == 0));
  vector<T> b{1 / a[0]};
  while (size(b) < size(a)) {
    vector<T> x(begin(a), begin(a) + min(size(a), 2 * size(b)));
    x *= b * b;
    b.resize(2 * size(b));
    for (auto i = size(b) / 2; i < min(size(x), size(b)); ++i) b[i] = -x[i];
  }
  return {begin(b), begin(b) + size(a)};
}
template <class T>
vector<T> operator/(vector<T> a, vector<T> b) {
  if (size(a) < size(b)) return {};
  reverse(begin(a), end(a)), reverse(begin(b), end(b));
  int n = size(a) - size(b) + 1;
  a.resize(n), b.resize(n);
  a *= inverse(b);
  return {rend(a) - n, rend(a)};
}
template <class T>
vector<T>& operator/=(vector<T>& a, const vector<T>& b) {
  return a = a / b;
}
template <class T>
vector<T> operator%(vector<T> a, const vector<T>& b) {
  if (size(a) < size(b)) return a;
  a -= a / b * b;
  return {begin(a), begin(a) + (size(b) - 1)};
}
template <class T>
vector<T>& operator%=(vector<T>& a, const vector<T>& b) {
  return a = a % b;
}
template <class T>
vector<T> derivative(const vector<T>& a) {
  vector<T> res(max((int)size(a) - 1, 0));
  for (int i = 0; i < (int)size(res); ++i) res[i] = (i + 1) * a[i + 1];
  return res;
}
template <class T>
vector<T> primitive(const vector<T>& a) {
  vector<T> res(size(a) + 1);
  for (int i = 1; i < (int)size(res); ++i) res[i] = a[i - 1] / i;
  return res;
}
template <class T>
vector<T> logarithm(const vector<T>& a) {
  assert(not empty(a) and a[0] == 1);
  auto res = primitive(derivative(a) * inverse(a));
  return {begin(res), begin(res) + size(a)};
}
template <class T>
vector<T> exponent(const vector<T>& a) {
  assert(empty(a) or a[0] == 0);
  vector<T> b{1};
  while (size(b) < size(a)) {
    vector<T> x(begin(a), begin(a) + min(size(a), 2 * size(b)));
    x[0] += 1;
    b.resize(2 * size(b));
    x -= logarithm(b);
    x *= {begin(b), begin(b) + size(b) / 2};
    for (auto i = size(b) / 2; i < min(size(x), size(b)); ++i) b[i] = x[i];
  }
  return {begin(b), begin(b) + size(a)};
}

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  using mint = modular<int(1e9) + 7>;
  int s;
  cin >> s;
  vector<mint> num{1, -1}, den{1, -1, 0, -1};
  den.resize(s + 1);
  auto f = num * inverse(den);
  cout << f[s] << '\n';
}


Measured memory_bytes: 3708