#include <bits/stdc++.h>
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
bool ldequal(long double a, long double b) { return abs(a - b) < 1e-9; }
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long N = 1e18 + 1;
long long n, m, k;
long long cal(long long num) {
  long long res = 0;
  for (int i = 1; i < n + 1; i++) {
    long long val = num / i;
    if (num % i == 0) val--;
    res += min(val, m);
  };
  return res;
}
void solve() {
  cin >> n >> m >> k;
  long long begin = 1, end = n * m;
  while (begin < end) {
    ;
    if (begin + 1 == end) {
      if (cal(end) < k)
        begin++;
      else
        end--;
      break;
    }
    long long mid = begin + end;
    mid /= 2;
    if (cal(mid) < k)
      begin = mid;
    else
      end = mid - 1;
  }
  cout << begin;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long test = 1;
  for (int i = 1; i < test + 1; i++) {
    ;
    solve();
    cout << "\n";
  }
  return 0;
}

### Prompt

Your task is to create a Cpp solution to the following problem:

Bizon the Champion isn't just charming, he also is very smart.

While some of us were learning the multiplication table, Bizon the Champion had fun in his own manner. Bizon the Champion painted an n × m multiplication table, where the element on the intersection of the i-th row and j-th column equals i·j (the rows and columns of the table are numbered starting from 1). Then he was asked: what number in the table is the k-th largest number? Bizon the Champion always answered correctly and immediately. Can you repeat his success?

Consider the given multiplication table. If you write out all n·m numbers from the table in the non-decreasing order, then the k-th number you write out is called the k-th largest number.

Input

The single line contains integers n, m and k (1 ≤ n, m ≤ 5·105; 1 ≤ k ≤ n·m).

Output

Print the k-th largest number in a n × m multiplication table.

Examples

Input

2 2 2


Output

2


Input

2 3 4


Output

3


Input

1 10 5


Output

5

Note

A 2 × 3 multiplication table looks like this:
    
    
      
    1 2 3  
    2 4 6  
      
    

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
bool ldequal(long double a, long double b) { return abs(a - b) < 1e-9; }
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long N = 1e18 + 1;
long long n, m, k;
long long cal(long long num) {
  long long res = 0;
  for (int i = 1; i < n + 1; i++) {
    long long val = num / i;
    if (num % i == 0) val--;
    res += min(val, m);
  };
  return res;
}
void solve() {
  cin >> n >> m >> k;
  long long begin = 1, end = n * m;
  while (begin < end) {
    ;
    if (begin + 1 == end) {
      if (cal(end) < k)
        begin++;
      else
        end--;
      break;
    }
    long long mid = begin + end;
    mid /= 2;
    if (cal(mid) < k)
      begin = mid;
    else
      end = mid - 1;
  }
  cout << begin;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long test = 1;
  for (int i = 1; i < test + 1; i++) {
    ;
    solve();
    cout << "\n";
  }
  return 0;
}

```