#include <iostream>
#include <string>
#include "MyStack.hpp"
#define BINARY 2
#define OCTAlk 8
#define HEXADECIMAL 16
using namespace std;
int main(void){
char num[] = "0123456789ABCDEF";
MyStack<int> *pStack = new MyStack<int>(30);
int N = 2017;
int remainder = 0;
while(N != 0){
remainder = N % HEXADECIMAL;
pStack->push(remainder);
N = N / HEXADECIMAL;
}
while(!pStack->stackEmpty()){
int elem = 0;
pStack->pop(elem);
cout << num[elem];
}
cout << endl;
delete pStack;
pStack = NULL;
}