//忘了是干什么的了
#include <math.h>
#include <iostream>
#include <float.h>
#include <string>
using namespace std;
int n=0;
string str;
int judge(int x) {
if(x%3==0) {
n++;
if(x/3==1)
return n;
judge(x/3);
}
else {
cout<<"not the number!"<<endl;
return 0;
}
}
void main()
{
int x;
while(6)
{
n=0;
cin>>x;
cout<<judge(x)<<endl;
}
}
#include <math.h>
#include <iostream>
#include <float.h>
#include <string>
using namespace std;
int n=0;
string str;
int judge(int x) {
if(x%3==0) {
n++;
if(x/3==1)
return n;
judge(x/3);
}
else {
cout<<"not the number!"<<endl;
return 0;
}
}
void main()
{
int x;
while(6)
{
n=0;
cin>>x;
cout<<judge(x)<<endl;
}
}