#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll s=0,n;
void solve(ll l, ll r) {
++s;
if (n / l == n / r) { /* solve stuff here */ }
else { ll mid = (l + r) / 2; solve(l, mid); solve(mid+1, r); }
}
int main() {
cin>>n;
ll C=sqrt(n)*2;
solve(1,n);
cout<<s<<endl;
cout<<4*C<<endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgbG9uZyBsb25nIGxsOwpsbCBzPTAsbjsKdm9pZCBzb2x2ZShsbCBsLCBsbCByKSB7CiAgKytzOwogIGlmIChuIC8gbCA9PSBuIC8gcikgeyAvKiBzb2x2ZSBzdHVmZiBoZXJlICovIH0KICBlbHNlIHsgbGwgbWlkID0gKGwgKyByKSAvIDI7IHNvbHZlKGwsIG1pZCk7IHNvbHZlKG1pZCsxLCByKTsgfQp9CmludCBtYWluKCkgewoJY2luPj5uOwoJbGwgQz1zcXJ0KG4pKjI7Cglzb2x2ZSgxLG4pOwoJY291dDw8czw8ZW5kbDsKCWNvdXQ8PDQqQzw8ZW5kbDsKCXJldHVybiAwOwp9