#include int main(){ int n;std::cin>>n; std::vectora; for(;n;n/=7)a.push_back(n%7); for(;!a.empty();a.pop_back())std::cout<