#include<iostream>
using namespace std;
int toOcr(int n)
{
cout << oct << n;
return 0;
}
int main() {
int x,y;
cin >> x;
toOcr(x);
return 0;
}
#include<iostream>
using namespace std;
int toOcr(int n)
{
cout << oct << n;
return 0;
}
int main() {
int x,y;
cin >> x;
toOcr(x);
return 0;
}