#include<bits/stdc++.h>
using namespace std;
long long n,pop,day,p;
long long a[100000005];
int main() {
cin>>n;
while(n!=pop) {
day++;
int x=0;
for(int i=1; i<=n; i++) {
if(a[i]==0) {
x++;
if(x==1){
if(i==n) p=day;
a[i]=1;
pop++;
}
if(x==3){
x=0;
}
}
}
}
cout<<day<<' '<<p;
return 0;
}
救命