#include <iostream>
using namespace std;
int main() {
double fib1=1,fib2=1,fib3,sum=3,E,a=1;
int k=2;
cin>>E;
if(E==2 || E==1)cout<<2<<endl<<3;
else if(E<1){
for(int i=3;a>=E;i++){
fib3=fib1+fib2;
a=i/fib3;
sum+=a;
fib1=fib2;
fib2=fib3;
k++;
}
cout<<k<<endl<<sum;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglkb3VibGUgZmliMT0xLGZpYjI9MSxmaWIzLHN1bT0zLEUsYT0xOyAKCWludCBrPTI7CgljaW4+PkU7ICAKCWlmKEU9PTIgfHwgRT09MSljb3V0PDwyPDxlbmRsPDwzOyAKCWVsc2UgaWYoRTwxKXsKCQlmb3IoaW50IGk9MzthPj1FO2krKyl7IAoJCQlmaWIzPWZpYjErZmliMjsKCQkJYT1pL2ZpYjM7IAoJCQlzdW0rPWE7CgkJCWZpYjE9ZmliMjsKCQkJZmliMj1maWIzOwoJCQlrKys7ICAKCQl9Cgljb3V0PDxrPDxlbmRsPDxzdW07Cgl9CglyZXR1cm4gMDsKfQ==