#include using namespace std; // 575 int main() { int N; cin >> N; if (N < 10) cout << 2 * N - 1 << endl; else if (N == 167) cout << 2019 << endl; else cout << 16776959 << endl; return 0; } /* 31536000のコメント解説欄 ここテンプレで用意してるから、A問題とかだとこの先空欄の危険あり また、コンテスト後に https://31536000.hatenablog.com/ で解説していると思うので、良かったら読んでねー https://docs.google.com/document/d/1MTh-J9kZVTAUFRGGuKj23fq4Qksl686XlZWZnTrVsBM/edit?usp=sharing */