#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n, m, k;
cin >> n >> m >> k;
vector<int> a(m);
for(auto &x: a){
cin >> x;
x *= 100;
}
sort(a.begin(), a.end());
int track_length = n * 100;
if(k ==0){
cout << 0;
return 0;
}
auto has_boost_in_range = [&](int current_pos, int delta) -> bool{
if(delta ==0){
return false;
}
if(pos + delta < track_length){
int lower = current_pos +1;
int upper = current_pos + delta;
int idx = lower_bound(a.begin(), a.end(), lower) - a.begin();
if(idx < m && a[idx] <= upper){
return true;
}
else{
return false;
}
}
else{
int lower1 = current_pos +1;
int upper1 = track_length -1;
int lower2 = 0;
int upper2 = (current_pos + delta) % track_length;
bool found = false;
if(lower1 <= upper1){
int idx1 = lower_bound(a.begin(), a.end(), lower1) - a.begin();
if(idx1 < m && a[idx1] <= upper1){
return true;
}
}
if(lower2 <= upper2){
int idx2 = lower_bound(a.begin(), a.end(), lower2) - a.begin();
if(idx2 < m && a[idx2] <= upper2){
return true;
}
}
return false;
}
};
int current_pos =0;
bool boost_active = false;
for(int sec=1; sec<=k; sec++){
int delta;
if(boost_active){
delta =200;
}
else{
delta =100;
}
int new_pos = (current_pos + delta) % track_length;
bool next_boost_active = false;
if(!boost_active){
if(has_boost_in_range(pos, delta)){
next_boost_active = true;
}
}
current_pos = new_pos;
boost_active = next_boost_active;
}
cout << current_pos;
}