#include using namespace std; using ll = long long; using P = pair; #define rep(i,n) for(int i=0;i> n; vector m; while (n>=7){ m.push_back(n%7); n /= 7; } m.push_back(n); for (int i=m.size()-1;i>=0;i--) cout << m[i]; cout << endl; return 0; }