#line 2 "/home/penguin8331/vscode/library/template/template.hpp" #include #line 3 "/home/penguin8331/vscode/library/template/macro.hpp" #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define elif else if #define updiv(N, X) (((N) + (X) - (1)) / (X)) #define sigma(a, b) ((a + b) * (b - a + 1) / 2) #line 3 "/home/penguin8331/vscode/library/template/alias.hpp" using ll = long long; using ld = long double; using pii = std::pair; using pll = std::pair; constexpr int inf = 1 << 30; constexpr ll INF = 1LL << 60; constexpr int dx[] = {1, 0, -1, 0, 1, -1, 1, -1}; constexpr int dy[] = {0, 1, 0, -1, 1, 1, -1, -1}; constexpr int mod = 998244353; constexpr int MOD = 1e9 + 7; #line 3 "/home/penguin8331/vscode/library/template/func.hpp" template inline bool chmax(T& a, T b) { return ((a < b) ? (a = b, true) : (false)); } template inline bool chmin(T& a, T b) { return ((a > b) ? (a = b, true) : (false)); } #line 3 "/home/penguin8331/vscode/library/template/util.hpp" struct IOSetup { IOSetup() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::cout.tie(0); std::cout << std::fixed << std::setprecision(12); std::cerr << std::fixed << std::setprecision(12); } } IOSetup; #line 1 "/home/penguin8331/vscode/library/template/debug.hpp" #ifdef LOCAL #include #else #define debug(...) #endif #line 8 "/home/penguin8331/vscode/library/template/template.hpp" using namespace std; #line 2 "A.cpp" int main() { int N, M, K; cin >> N >> M >> K; // 00000 0 1 0 1 0 1 0 1 111111 if (min(min(N, M) * 2, N + M - 1) < K) { cout << -1 << endl; return 0; } if((N==0||M==0)&&K>0){ cout<<-1<