#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector <int> v(n);
for(int i=0; i<n; i++){
cin >> v[i];
}
int x;
cin >> x;
auto it = lower_bound(v.begin(),v.end(),x) - v.begin();
cout << it;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: