#include <cstdio> #include <iostream> using namespace std; int main() { int n; while(scanf("%d", &n) != EOF) printf("%o\n", n); return 0; }