#include <bits/stdc++.h>
using namespace std;
const long long INF = LLONG_MAX;
const long long NINF = LLONG_MIN;
const long long mod = 1e9 + 7;
long double sqrtBinarySearch(long long num, long long p) {
  long long left = 0, right = num;
  long long mid;
  long double res;
  while (left <= right) {
    mid = (left + right) / 2;
    if (mid * mid == num) {
      res = mid;
      break;
    }
    if (mid * mid < num) {
      left = mid + 1;
      res = mid;
    } else {
      right = mid - 1;
    }
  }
  long double incr = 0.1;
  for (long long i = 0; i < p; i++) {
    while (res * res <= num) {
      res += incr;
    }
    res -= incr;
    incr /= 10;
  }
  return res;
}
long long modInverse(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long add(long long x, long long y) {
  x += y;
  while (x >= mod) x -= mod;
  while (x < 0) x += mod;
  return x;
}
long long mul(long long x, long long y) { return (x * 1ll * y) % mod; }
long long binpow(long long x, long long y) {
  long long ans = 1;
  while (y > 0) {
    if (y % 2 == 1) ans = mul(ans, x);
    x = mul(x, x);
    y /= 2;
  }
  return ans;
}
long long divmod(long long i, long long pp) {
  return ((i * (modInverse(pp, mod))) % mod);
}
long long divide(long long x, long long y) {
  return mul(x, binpow(y, mod - 2));
}
string to_binary(long long num) {
  string res = "";
  while (num) {
    res += ((num & (1LL)) + '0');
    num /= 2;
  }
  reverse(res.begin(), res.end());
  return res;
}
long long to_decimal(string bi) {
  long long dec = 0;
  long long si = bi.size();
  long long upd = 1;
  for (long long i = si - 1; i >= 0; i--) {
    dec += (upd * ((long long)(bi[i] - '0')));
    upd *= 2;
  }
  return dec;
}
vector<bool> SieveOfEratosthenes(long long n) {
  vector<bool> prime(n + 1, true);
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  return prime;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long digitsum(long long x) {
  long long ans = 0;
  while (x) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}
long long nCr(long long n, long long r) {
  if (n == r)
    return 1;
  else if (r == 0)
    return 1;
  else
    return ((nCr(n - 1, r - 1) + nCr(n - 1, r)) % mod);
}
long long sqroot(long long number) {
  long long x = sqrt(number);
  while (x * x < number) x++;
  while (x * x > number) x--;
  return x;
}
long long cbroot(long long number) {
  long long x = cbrt(number);
  while (x * x * x < number) x++;
  while (x * x * x > number) x--;
  return x;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b % a, a);
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b & 1) return (a * power(a, b - 1));
  long long temp = power(a, b / 2);
  return (temp * temp);
}
long long powermod(long long a, long long b) {
  if (b == 0) return 1;
  if (b & 1) return (a * powermod(a, b - 1)) % mod;
  long long temp = powermod(a, b / 2) % mod;
  return (temp * temp) % mod;
}
vector<long long> factor(long long x) {
  vector<long long> fact;
  for (long long i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      fact.push_back(i);
      if (i * i != x) {
        fact.push_back(x / i);
      }
    }
  }
  return fact;
}
long long check() { return 0; }
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  long long l = 1, r = n * m;
  while (l < r) {
    long long mid = (l + r) >> 1;
    long long sum = 0;
    for (long long i = 1; i <= n; i++) {
      sum += min(m, (mid) / i);
    }
    if (sum < k) {
      l = mid + 1;
    } else {
      r = mid;
    }
  }
  cout << l << '\n';
  cerr << "time taken : " << (long double)clock() / CLOCKS_PER_SEC << "secs"
       << '\n';
  return 0;
}

### Prompt

Create a solution in cpp for 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;
const long long INF = LLONG_MAX;
const long long NINF = LLONG_MIN;
const long long mod = 1e9 + 7;
long double sqrtBinarySearch(long long num, long long p) {
  long long left = 0, right = num;
  long long mid;
  long double res;
  while (left <= right) {
    mid = (left + right) / 2;
    if (mid * mid == num) {
      res = mid;
      break;
    }
    if (mid * mid < num) {
      left = mid + 1;
      res = mid;
    } else {
      right = mid - 1;
    }
  }
  long double incr = 0.1;
  for (long long i = 0; i < p; i++) {
    while (res * res <= num) {
      res += incr;
    }
    res -= incr;
    incr /= 10;
  }
  return res;
}
long long modInverse(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long add(long long x, long long y) {
  x += y;
  while (x >= mod) x -= mod;
  while (x < 0) x += mod;
  return x;
}
long long mul(long long x, long long y) { return (x * 1ll * y) % mod; }
long long binpow(long long x, long long y) {
  long long ans = 1;
  while (y > 0) {
    if (y % 2 == 1) ans = mul(ans, x);
    x = mul(x, x);
    y /= 2;
  }
  return ans;
}
long long divmod(long long i, long long pp) {
  return ((i * (modInverse(pp, mod))) % mod);
}
long long divide(long long x, long long y) {
  return mul(x, binpow(y, mod - 2));
}
string to_binary(long long num) {
  string res = "";
  while (num) {
    res += ((num & (1LL)) + '0');
    num /= 2;
  }
  reverse(res.begin(), res.end());
  return res;
}
long long to_decimal(string bi) {
  long long dec = 0;
  long long si = bi.size();
  long long upd = 1;
  for (long long i = si - 1; i >= 0; i--) {
    dec += (upd * ((long long)(bi[i] - '0')));
    upd *= 2;
  }
  return dec;
}
vector<bool> SieveOfEratosthenes(long long n) {
  vector<bool> prime(n + 1, true);
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  return prime;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long digitsum(long long x) {
  long long ans = 0;
  while (x) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}
long long nCr(long long n, long long r) {
  if (n == r)
    return 1;
  else if (r == 0)
    return 1;
  else
    return ((nCr(n - 1, r - 1) + nCr(n - 1, r)) % mod);
}
long long sqroot(long long number) {
  long long x = sqrt(number);
  while (x * x < number) x++;
  while (x * x > number) x--;
  return x;
}
long long cbroot(long long number) {
  long long x = cbrt(number);
  while (x * x * x < number) x++;
  while (x * x * x > number) x--;
  return x;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b % a, a);
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b & 1) return (a * power(a, b - 1));
  long long temp = power(a, b / 2);
  return (temp * temp);
}
long long powermod(long long a, long long b) {
  if (b == 0) return 1;
  if (b & 1) return (a * powermod(a, b - 1)) % mod;
  long long temp = powermod(a, b / 2) % mod;
  return (temp * temp) % mod;
}
vector<long long> factor(long long x) {
  vector<long long> fact;
  for (long long i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      fact.push_back(i);
      if (i * i != x) {
        fact.push_back(x / i);
      }
    }
  }
  return fact;
}
long long check() { return 0; }
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  long long l = 1, r = n * m;
  while (l < r) {
    long long mid = (l + r) >> 1;
    long long sum = 0;
    for (long long i = 1; i <= n; i++) {
      sum += min(m, (mid) / i);
    }
    if (sum < k) {
      l = mid + 1;
    } else {
      r = mid;
    }
  }
  cout << l << '\n';
  cerr << "time taken : " << (long double)clock() / CLOCKS_PER_SEC << "secs"
       << '\n';
  return 0;
}

```