#include<iostream>
int n;
int main(){
  std::cin >> n;
  int ans = 0;
  while(true){
    ans++;
    if((ans-1)*100+1<=n&&n<=ans*100){
      std::cout << ans << std::endl;
      break;
    }
  }
  return 0;
}
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;



int main() {
    string s;
    cin >> s;
    array<int, 10> a{};
    for (auto &&i : s) a[i-'0']++;
    vector<string> t = {"8", "16", "24", "32", "48", "56", "64", "72", "88", "96"};
    if(s.size() <= 2){
        for (auto &&i : t) {
            for (int j = 0; j < 2; ++j) {
                if(i == s) return puts("Yes"), 0;
                reverse(i.begin(),i.end());
            }
        }
        return puts("No"), 0;
    }
    for (int i = 104; i <= 999; i += 8) {
        string u = to_string(i);
        for (auto &&j : u) a[j-'0']--;
        int ok = 1;
        for (auto &&j : a) if(j < 0) ok = 0;
        if(ok) return puts("Yes"), 0;
        for (auto &&j : u) a[j-'0']++;
    }
    puts("No");
    return 0;
}