/**
 *    AUTHOR:    __SIGSEGV__                  
 *   CREATED:   13.09.2020 21:08:14  
**/

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

template<int Mod = 998244353>
class Modular {
private:
    int value;
    static int mod_inverse(int a, int mod) {
        a %= mod;
        assert(a);
        if (a == 1)
            return 1;
        return int(mod - ll(mod_inverse(mod, a)) * ll(mod) / a);
    }
public:
    Modular(): value(0) {}
    Modular(ll val):value(val % Mod) { if (value < 0) value += Mod;}
    friend std::ostream& operator << (std::ostream& out, const Modular& n) {return out << n.value;}
    friend std::istream& operator >> (std::istream& in, Modular& n) {ll v; in >> v; n = Modular(v); return in;}
    explicit operator int() const { return this->value;}
    friend bool operator == (const Modular& a, const Modular& b) {return a.value == b.value;}
    friend bool operator != (const Modular& a, const Modular& b) {return a.value != b.value;}

    Modular inverse() const {
        Modular ret;
        ret.value = mod_inverse(this->value, Mod);
        return ret;
    }
    Modular neg() const {
        Modular ret;
        ret.value = this->value ? Mod - this->value : 0;
        return ret;
    }
    Modular operator- (){return neg();}
    Modular& operator++ () {this->value++; if (this->value == Mod) this->value = 0; return *this;}
    Modular& operator-- () {if (this->value == 0) this->value = Mod; --this->value; return *this;}
    Modular& operator+= (const Modular& other) {this->value += other.value; if (this->value >= Mod) this->value -= Mod; return *this;}
    Modular& operator-= (const Modular& other) {this->value -= other.value; if (this->value < 0) this->value += Mod; return *this;}
    Modular& operator*= (const Modular& other) {this->value = ll(this->value) * ll(other.value) % Mod; return *this;}    
    Modular& operator/= (const Modular& other) {return *this *= other.inverse();}
    friend Modular operator ++ (Modular& a, int) {Modular ret = a; ++a; return ret;}
    friend Modular operator -- (Modular& a, int) {Modular ret = a; --a; return ret;}
    friend Modular operator + (const Modular& a, const Modular& b) {Modular ret = a; ret += b; return ret;}
    friend Modular operator - (const Modular& a, const Modular& b) {Modular ret = a; ret -= b; return ret;}
    friend Modular operator * (const Modular& a, const Modular& b) {Modular ret = a; ret *= b; return ret;}
    friend Modular operator / (const Modular& a, const Modular& b) {Modular ret = a; ret /= b; return ret;}
};
using Mint = Modular<(int) 1e9 + 7>;
template<typename T1, typename T2>
T1 epow(T1 a, T2 b) {
  assert(b >= 0);
  T1 ret = T1(1);
  while (b) {
    if (b & 1) {
      ret *= a;
    }
    a *= a;
    b >>= 1;
  }
  return ret;
}

Mint fact[2010];

Mint choose(Mint n, Mint r) {
  Mint ret = fact[int(n)];
  ret *= fact[int(r)].inverse() * fact[int(n - r)].inverse();
  return ret;
}

int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int s;
  cin >> s;
  Mint ans = 0;
  fact[0] = 1;
  for (int i = 1; i <= 2009; i++) {
    fact[i] = fact[i - 1] * Mint(i);
  }
  ans = (s >= 3);
  for (int i = 2; i <= s / 3; i++) {  
    Mint temp = choose(s - 2 * i - 1, i - 1);    
    ans += temp;
  }
  cout << ans << '\n';
  return 0;
}

Measured memory_bytes: 3664