import java.util.Scanner;
public class 十进制转八进制 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
String shu = Integer.toOctalString(num);
System.out.println(shu);
}
}
import java.util.Scanner;
public class 十进制转八进制 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
String shu = Integer.toOctalString(num);
System.out.println(shu);
}
}