#include using namespace std; unsigned long long x,f1,f2,f3,b; int main() { cin >> x; if(x == 1) { cout<<0; return 0; } else if(x == 2) { cout << 2; return 0; } f1 = 1; f2 = 1; b = 2; while(f1+f2 < x) { f3 = f1+f2; f1 = f2; f2 = f3; b++; } cout<