#include using namespace std; #define int long long #define ii pair #define app push_back #define all(a) a.begin(), a.end() #define bp __builtin_popcountll #define ll long long #define mp make_pair #define f first #define s second #define Time (double)clock()/CLOCKS_PER_SEC #define debug(x) std::cout << #x << ": " << x << '\n'; const int INF = 1e18; signed main() { #ifdef HOME freopen("input.txt", "r", stdin); #else #define endl '\n' ios_base::sync_with_stdio(0); cin.tie(0); #endif int v, t, p; cin >> v >> t >> p; int full = 0; { int l = 0, r = INF; while (l < r - 1) { int m = (l + r) >> 1; int del = (m + t - 1) / t; if (m - del >= v * p) r = m; else l = m; } full = r; } auto get = [&](int n) { return (n + t - 1) / t; }; //after v * p secs we have 0 int S = 0; if (p) S = full; int l = 0, r = INF; while (l < r - 1) { int m = (l + r) >> 1; int del = get(S+m) - get(S); if (m - del > v) r = m; else l = m; } cout << full + l << endl; }