#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(x) (int((x).size())) #define bit(x) (1 << (x)) #define cnt1(x) (__builtin_popcount(x)) template inline void chkmax(T& x, T y) { if (x < y) x = y; } template inline void chkmin(T& x, T y) { if (y < x) x = y; } typedef long long LL; typedef double DB; typedef pair PII; typedef vector VI; const int MX = 65; LL dp[MX]; void init() { int i; dp[0] = 1, dp[1] = 2, dp[2] = 3; for (i = 3; i < MX; i++) dp[i] = dp[i - 1] + dp[i - 3]; } int main() { int n; init(); while (scanf("%d", &n) == 1) printf("%I64d\n", dp[n] - 1); return 0; }