14 lines
250 B
C++
14 lines
250 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int dfs(int u) {
|
|
if (u == 1) return 0;
|
|
if (u == 2) return 1;
|
|
return dfs(u - 1) + dfs(u - 2);
|
|
}
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
cout << dfs(n+1) << endl;
|
|
return 0;
|
|
} |