#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
vector<int> a;
for (int i = 1; i <= n; i++) {
a.push_back(i);
}
int z = m - 1;
int ans;
while (k > 0) {
a.erase(a.begin() + z);
if(z>=a.size()){
ans = a[z-a.size()];
}
else{
ans = a[z];
}
z = z + m - 1;
k--;
if(z>=a.size()){
z=z-a.size();
}
/*
for(int i = 0 ; i<a.size() ; i++){
cout<<a[i]<<" ";
}
*/
//cout<<z;
//cout<<endl;
}
cout<<ans<<endl;
return 0;
}