#include <iostream.h>

const int S=10;
int list[S];

void init() {
  for (int i=0; i < S; i++)
    list[i] = i*3;
}

int bs(int list[], int k) {
  int i=S/2;
  // I'm sorry I wrote the following line:
  for(int t=S,b=0;list[i]!=k&&t>=b;(list[i]>k?t=i-1:b=i+1,i=(t+b)/2));
  return list[i]==k?i:-1;
}

void main() {
  int k;
  cin >> k;
  init();
  int i = bs(list, k);
  if (i == -1)
    cout << "Not found in the list" << endl;
  else
    cout << "Found at index " << i << endl;
}
