using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int n_sinsu = 7; long answer = 0; long a = 1; while(N != 0) { answer += (N % n_sinsu) * a; N = N / n_sinsu; a *= 10; } Console.WriteLine(answer); } } }