#include <bits/stdc++.h>
using namespace std;
int main() {
  long long K;
  cin >> K;
  long long digit = K / 9;
  int remain = K % 9;
  if (remain != 0) {
    digit++;
  } else
    remain = 9;
  cout << remain;
  for (int i = 1; i < digit; i++) {
    cout << 9;
  }
  cout << endl;
  return 0;
}
