#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int InsertionSearch(int arr[], int n, int low, int high){ int mid=low+(n-arr[low])/(arr[high]-arr[low])*(high-low); if (arr[mid]==n) return mid; else if (arr[mid]>n) InsertionSearch(arr, n, low, mid-1); else InsertionSearch(arr, n, mid+1, high); } int main() { int arr[10], n; for (int i=0; i<5; i++) scanf("%d", &arr[i]); scanf("%d", &n); int k=InsertionSearch(arr, n, 0, 4); printf("%d", k); return 0; }