#include<bits/stdc++.h>
using namespace std; const int C=1e9+1e5;
int main()
{
ios::sync_with_stdio(false); cin.tie(0);
int n,m,z1=0,z2; cin>>n; vector<int> a(n); m=n;
for(int x=0;x<n;x++) a[x]=x+1;
while(n)
{
int ln=0;
for(int x=0;x<m;x++)
{
if(a[x]==C) break;
if(x%3==0)
{
if(a[x]==m) z2=z1+1;
ln++; a[x]=C;
}
}
n-=ln; z1++; sort(begin(a),end(a));
}
cout<<z1<<' '<<z2;
return 0;
}