#include<bits/stdc++.h>
using namespace std;

#define  all(x)        (x).begin(),(x).end()
#define  pb            push_back
#define  lb            lower_bound
#define  ub            upper_bound
#define  fi            first
#define  se            second
#define  pii           pair<int,int>
#define  fastIO        ios_base::sync_with_stdio(false); cin.tie(NULL);
#define endl '\n'
#define int long long

typedef double db;
typedef long long ll;

const int N = 2e5 + 5;
const int MOD = 1e9 + 7;
const int INF = 1e9;

void solve() {

	int n; cin >> n;
	int ans = (n + 99) / 100;
	cout << ans;
}

signed main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	fastIO

	int t = 1;
	// cin >> t;

	for (int tt = 1; tt <= t; tt++) {
		solve();
	}
}
#include <bits/stdc++.h>
#define startt ios_base::sync_with_stdio(false);cin.tie(0);
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
typedef unsigned long long ull;
typedef long long  ll;
using namespace std;
#define FOR(n) for(int i=0;i<n;i++)
#define vt vector
#define vint vector<int>
#define all(v) v.begin(), v.end()
#define sz(a) (int)a.size()
#define MOD 1000000007
#define MOD2 998244353
#define MX 1000000000
#define nax 100005
#define MXL 1000000000000000000
#define PI 3.14159265
#define pb push_back
#define pf push_front
#define sc second
#define fr first
#define int ll
#define endl '\n'
#define ld long double

int ceildiv(int one, int two) {
    if (one % two == 0) {return one / two;}
    else {return one / two + 1;}
} int power(int n, int pow, int m) {
    if (pow == 0) return 1;
    if (pow % 2 == 0) {
        ll x = power(n, pow / 2, m);
        return (x * x) % m;
    }
    else return (power(n, pow - 1, m) * n) % m;
} int gcd(int a, int b) {
    if (!b)return a;
    return gcd(b, a % b);
} int factorial(int n, int mod) {
    if (n > 1)
        return (n * factorial(n - 1, mod)) % mod;
    else
        return 1;
} int lcm(int a, int b) {
    return (a * b) / gcd(a, b);
} vector<int> read(int n) {vector<int> a; for (int i = 0; i < n; i++) { int x; cin >> x; a.pb(x);} return a;}vector<vector<int>> adj;void init(int n) {for (int i = 0; i <= n; i++) { vector<int> a; adj.pb(a);}}

void decToOctal(int n)
{
     
    // array to store octal number
    int octalNum[100];
 
    // counter for octal number array
    int i = 0;
    while (n != 0) {
 
        // storing remainder in octal array
        octalNum[i] = n % 8;
        n = n / 8;
        i++;
    }
 
    // printing octal number array in reverse order
    for (int j = i - 1; j >= 0; j--)
        cout << octalNum[j];
}

bool dec(int n)
{
    int octalNum[100];
    int i = 0;
    int ncop = n;
    while (n != 0) {
        octalNum[i] = n % 8;
        n = n / 8;
        i++;
    }
    while(ncop != 0)
    {
        if(ncop%10 == 7)
        {
            return false;
        }
        ncop/=10;
    }
    for (int j = i - 1; j >= 0; j--)
    {
        if(octalNum[j] == 7)
        {
            return false;
        }
    }
    return true;
}

void solve()
{
    int n;
    cin >> n;
    int ans = 0;
    for(int i = 1; i <= n; i++)
    {
        if(dec(i))
        {
            ans++;
        }
    }
    cout << ans << endl;
}

int32_t main() {
    startt;
    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
}

