public class Main {
public static void main(String[] args) {
Solution6666 s=new Solution6666();
System.out.println(s.checkPowersOfThree(8,2));
}
}
class Solution6666 {
public String checkPowersOfThree(int n,int x) {
String s=new String();
while(n!=0){
int temp=n%x;
n/=x;
s=temp+s;
}
return s;
}
}