package net.ipipip0129.yukicoder.no499; import java.util.Scanner; public class Main { public static void main(String[] args) { System.out.println(Integer.toString(new Scanner(System.in).nextInt(), 7)); } }