using System.Collections.Generic; using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); Console.WriteLine(getAns(n, 7)); } public static string getAns(int n, int a) { var t = new List(); while (n >= a) { t.Add(n % a); n /= a; } t.Add(n); t.Reverse(); return string.Join("", t); } }