#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;
const double eps = 1e-14;
const int mod = 1e9 + 7;
const int inf = ((1 << 30) - 1);
const ll linf = (1LL << 60);
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll k;
  cin >> k;
  if (k <= 9)
    cout << k << endl;
  else {
    ll tmp;
    tmp = (k - 9) * 10 + 9;
    cout << tmp << endl;
  }
  return 0;
}
