#include <iostream>
using namespace std;
int lower_bound(int d, int a[], int n)
{
int l=0, r=n;
while (l < r)
{
int m = (l+r)/2; //Important to floor the middle, otherwise it will not work when l+1=r
if (a[m] < d)
l = m + 1;
else
r = m;
}
return l;
}
int main() {
// your code goes here
int a[] = {10, 20};
int d;
while (cin >> d)
{
cout << lower_bound(d, a, (sizeof(a))/(sizeof(a[0]))) << "\n";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGxvd2VyX2JvdW5kKGludCBkLCBpbnQgYVtdLCBpbnQgbikKewogICAgaW50IGw9MCwgcj1uOwogICAgd2hpbGUgKGwgPCByKQogICAgewogICAgICAgaW50IG0gPSAobCtyKS8yOyAgLy9JbXBvcnRhbnQgdG8gZmxvb3IgdGhlIG1pZGRsZSwgb3RoZXJ3aXNlIGl0IHdpbGwgbm90IHdvcmsgd2hlbiBsKzE9cgogICAgICAgaWYgKGFbbV0gPCBkKQogICAgICAgICAgbCA9IG0gKyAxOwogICAgICAgZWxzZQogICAgICAgICAgciA9IG07CiAgICB9CiAgICByZXR1cm4gbDsKfQoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQgYVtdID0gezEwLCAyMH07CglpbnQgZDsKCXdoaWxlIChjaW4gPj4gZCkKCXsKCQljb3V0IDw8IGxvd2VyX2JvdW5kKGQsIGEsIChzaXplb2YoYSkpLyhzaXplb2YoYVswXSkpKSA8PCAiXG4iOwoJfQoJcmV0dXJuIDA7Cn0=