#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
template <class T>
inline bool chmin(T &a, T b)
{
    if (a > b)
    {
        a = b;
        return true;
    }
    return false;
}
template <class T>inline bool chmax(T &a, T b){if (a < b){a = b;return true;}return false;}
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Pl = pair<long long, long long>;
using veci = vector<int>;
using vecl = vector<long long>;
using vecveci = vector<vector<int>>;
using vecvecl = vector<vector<long long>>;

int main() {
    ll x; cin >> x;
    ll ans = x/11*2;
    ll rest = x%11;
    if(rest >= 7) ans += 2;
    else if(rest > 0) ans++; 
    cout << ans << endl;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int a, x, y;
  cin >> a;
  x = a;

  // ここにプログラムを追記
  while (x > 0) {
    y += x % 10;
    x /= 10;
  }
  if ((a % y) == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
