stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <cstdlib>

#include <iostream>

using namespace std;



bool comp(int h1, int w1, int h2, int w2) {

	const double d1 = h1 * h1 + w1 * w1, d2 = h2 * h2 + w2 * w2;

	if(d1 != d2)

		return d1 > d2;

	else

		return h1 > h2;

}



int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);



	for(int h, w; cin >> h >> w, h;) {

		int ans_h = 200, ans_w = 200;

		for(int i = 1; i <= 150; ++i) {

			for(int j = i + 1; j <= 150; ++j) {

				if(comp(i, j, h, w) && comp(ans_h, ans_w, i, j)) {

					ans_h = i;

					ans_w = j;

				}

			}

		}



		cout << ans_h << " " << ans_w << endl;

	}



	return EXIT_SUCCESS;

}

// Faster C++ solution for the same problem (measured speedup: 1.6525827631031957x):
#include <cstdlib>

#include <iostream>

using namespace std;



bool comp(int h1, int w1, int h2, int w2) {

	const double d1 = h1 * h1 + w1 * w1, d2 = h2 * h2 + w2 * w2;

	if(d1 != d2)

		return d1 > d2;

	else

		return h1 > h2;

}



int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);



	for(int h, w; cin >> h >> w, h;) {

		int ans_h = 200, ans_w = 200;

		for(int i = 1; i <= 150; ++i) {

			for(int j = i + 1; j <= 150; ++j) {

				if(comp(i, j, h, w)) {

					if(comp(ans_h, ans_w, i, j)) {

						ans_h = i;

						ans_w = j;

					}

					break;

				}

			}

		}



		cout << ans_h << " " << ans_w << endl;

	}



	return EXIT_SUCCESS;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int a, b, c;



int main() {

	cin >> a >> b >> c;

	if(a + b >= c)

		puts("Yes");

	else

		puts("No");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.281407811971646x):
#include<stdio.h>



int main(){

	

	int a,b,c;

	

	scanf("%d %d %d",&a,&b,&c);

	

	int total = a +b ;

	

	if(total < c){

		printf("No\n");

	}else{

		printf("Yes\n");

	}

	

	return 0;

	

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std ;



int main()

{

	

	int a,b,c ;

	

	cin >> a >> b >> c ;

	

	if( a+b >= c )

	{

		cout << "Yes" << endl ;

		//cout << "He has "<< a << " + " << b << " = " << a+b << " yen, so he can buy the " << c << "-yen toy." ;

	}

	else

	{

		cout << "No" << endl ;

		//cout << "He has "<< a << " + " << b << " = " << a+b << " yen, but he cannot buy the " << c << "-yen toy." ;

	}

	

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.310123032428497x):
#include<stdio.h>



int main(){

	

	int a,b,c;

	

	scanf("%d %d %d",&a,&b,&c);

	

	int total = a +b ;

	

	if(total < c){

		printf("No\n");

	}else{

		printf("Yes\n");

	}

	

	return 0;

	

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



long long int N, p[364364], id[364364], dp[364364], x, i;



int main(){

    iota(p, p + 364364, 1);

    scanf("%lld", &N);

    for(; i < N; ++i){

        scanf("%lld", p + i);

        id[p[i]] = i;

    }

    dp[N] = 0;

    x = N;

    for(; --i;){

        if(dp[i + 1]){

            dp[i] = dp[i + 1];

            if((id[i] < id[i + 1]) ^ (id[i + 1] < id[x]) ^ (id[x] < id[i])){

                ++dp[i];

                x = i + 1;

            }

        }else{

            dp[i] = dp[i + 1] + ((id[i] > id[i + 1]) ? 1 : 0);

            if(id[i] < id[i + 1])--x;

        }

    }

    cout << dp[1] << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 20.533817037672854x):
#import<cstdio>

int N,id[8<<15],dp[8<<15],x,i;main(){scanf("%d",&N);for(;i<N;id[x]=i,++i)scanf("%d",&x);x=N;for(;--i;)if(dp[i+1]){dp[i]=dp[i+1];if((id[i]<id[i+1])^(id[i+1]<id[x])^(id[x]<id[i])){++dp[i];x=i+1;}}else{dp[i]=dp[i + 1]+(id[i]>id[i+1]);if(id[i]<id[i+1])--x;}printf("%d",dp[1]);}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



long long int N, p[364364], id[364364], dp[364364], x, i;



int main(){

    iota(p, p + 364364, 1);

    scanf("%lld", &N);

    for(; i < N; ++i){

        scanf("%lld", p + i);

        id[p[i]] = i;

    }

    dp[N] = 0;

    x = N;

    for(; --i;){

        if(dp[i + 1]){

            dp[i] = dp[i + 1];

            if((id[i] < id[i + 1]) ^ (id[i + 1] < id[x]) ^ (id[x] < id[i])){

                ++dp[i];

                x = i + 1;

            }

        }else{

            dp[i] = dp[i + 1] + ((id[i] > id[i + 1]) ? 1 : 0);

            if(id[i] < id[i + 1])--x;

        }

    }

    cout << dp[1] << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 20.537872063497446x):
#import<cstdio>



int N, d[8 << 15], p[8 << 15], x, i;



main(){

    scanf("%d", &N);

    for(; i < N; d[x] = ++i)

        scanf("%d", &x);

    x = N;

    for(; --i; p[i] += p[i + 1])

        if(p[i + 1]){

            if((d[i] < d[i + 1]) ^ (d[i + 1] < d[x]) ^ (d[x] < d[i])){

                ++p[i];

                x = i + 1;

            }

        }else

            if(d[i] < d[i + 1])--x;

            else++p[i];

    printf("%d", p[1]);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



long long int N, p[364364], id[364364], dp[364364], x, i;



int main(){

    iota(p, p + 364364, 1);

    scanf("%lld", &N);

    for(; i < N; ++i){

        scanf("%lld", p + i);

        id[p[i]] = i;

    }

    dp[N] = 0;

    x = N;

    for(; --i;){

        if(dp[i + 1]){

            dp[i] = dp[i + 1];

            if((id[i] < id[i + 1]) ^ (id[i + 1] < id[x]) ^ (id[x] < id[i])){

                ++dp[i];

                x = i + 1;

            }

        }else{

            dp[i] = dp[i + 1] + ((id[i] > id[i + 1]) ? 1 : 0);

            if(id[i] < id[i + 1])--x;

        }

    }

    cout << dp[1] << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 20.90531014451197x):
#import<cstdio>



template<typename ...> static inline int gc(void) { return getchar(); }

static inline void read(int &x){int k,m=0;x=0;for(;;){k=gc();if(48<=k&&k<=57){x=k-48;break;}}for(;;){k=gc();if(k<48||k>57)break;x=x*10+k-48;}}



int N, d[262144], p, x, i;



main(){

    read(N);

    for(; i < N; d[x] = ++i)read(x);

    x = N;

    for(; --i;)

        if(p){

            if((d[i] < d[i + 1]) ^ (d[i + 1] < d[x]) ^ (d[x] < d[i])){

                ++p;

                x = i + 1;

            }

        }else

            if(d[i] < d[i + 1])--x;

            else++p;

    printf("%d", p);

}
// Slower C++ solution:
#include <cstdio>

#include <iostream>

#include <cstring>

#include <queue>

#include <cctype>

#include <algorithm>

#include <cmath>

#include <map>

#include <string>

#include <vector>



using namespace std;

typedef long long ll;



int a[200005],d[200005],ans[200005],f[200005];

int main()

{

    int n,i;

    scanf("%d",&n);

    for(i=1;i<=n;i++)

    {

        scanf("%d",&a[i]);

        d[a[i]]=i;

    }

    for(i=n-1;i>=1;i--)

    {

        if(ans[i+1]==0)

        {

            if(d[i]>d[i+1])

            {

                ans[i]=1;

                f[i]=i+1;

            }

        }

        else

        {

            int aa=d[i],bb=d[i+1],cc=d[f[i+1]];

            if((aa<bb&&bb<cc)||(cc<aa&&aa<bb)||(bb<cc&&cc<aa))

            {

                ans[i]=ans[i+1];

                f[i]=f[i+1];

            }

            else

            {

                ans[i]=ans[i+1]+1;

                f[i]=i+1;

            }

        }

    }

    printf("%d\n",ans[1]);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.195928166809799x):
#include "cstdio"

using namespace std;

typedef long long ll;

int a[200005],d[200005],ans[200005],f[200005];

int main()

{

    int n,i;

    scanf("%d",&n);

    for(i=1;i<=n;i++)

    {

        scanf("%d",&a[i]);

        d[a[i]]=i;

    }

    for(i=n-1;i>=1;i--)

    {

        if(ans[i+1]==0)

        {

            if(d[i]>d[i+1])

            {

                ans[i]=1;

                f[i]=i+1;

            }

        }

        else

        {

            int aa=d[i],bb=d[i+1],cc=d[f[i+1]];

            if((aa<bb&&bb<cc)||(cc<aa&&aa<bb)||(bb<cc&&cc<aa))

            {

                ans[i]=ans[i+1];

                f[i]=f[i+1];

            }

            else

            {

                ans[i]=ans[i+1]+1;

                f[i]=i+1;

            }

        }

    }

    printf("%d\n",ans[1]);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cmath>

#include <cstring>

#include <algorithm>

#include <vector>

#include <map>

#include <cstdlib>

#include <set>

#include <stack>

#include <queue>

using namespace std;



#define X first

#define Y second

#define N 100010

#define M 400010

typedef long long ll;

typedef pair<int,int> pii;

const int Mod=1000000007;



ll Solve(ll x)

{

	if (x<=6) return 1;

	if (x<=11) return 2;

	

	ll ans=x/11*2; x%=11;

	if (x==0) return ans;

	if (x<=6) return ans+1;

	return ans+2;

}



int main()

{

	//freopen("in.in","r",stdin);

	//freopen("out.out","w",stdout);

	

	ll x; 

	cin >> x;

	cout<< Solve(x)<<endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.255352001554376x):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

typedef long long ll;

ll i,j,k,n,ans;

int main(){

	while (scanf("%lld",&n)!=EOF){

		ans=n/11*2;k=n%11;

		if (k&&k<=6) ans++;

		if (k>6) ans+=2;

		printf("%lld\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cmath>

#include <cstring>

#include <algorithm>

#include <vector>

#include <map>

#include <cstdlib>

#include <set>

#include <stack>

#include <queue>

using namespace std;



#define X first

#define Y second

#define N 100010

#define M 400010

typedef long long ll;

typedef pair<int,int> pii;

const int Mod=1000000007;



ll Solve(ll x)

{

	if (x<=6) return 1;

	if (x<=11) return 2;

	

	ll ans=x/11*2; x%=11;

	if (x==0) return ans;

	if (x<=6) return ans+1;

	return ans+2;

}



int main()

{

	//freopen("in.in","r",stdin);

	//freopen("out.out","w",stdout);

	

	ll x; 

	cin >> x;

	cout<< Solve(x)<<endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2611213523776685x):
#include <cstdio>

#include <cstring>

#include <cmath>

#include <algorithm>

#include <vector>

#include <string>

#include <map>

#include <set>

#include <cassert>

using namespace std;

#define rep(i,a,n) for (int i=a;i<n;i++)

#define per(i,a,n) for (int i=n-1;i>=a;i--)

#define pb push_back

#define mp make_pair

#define all(x) (x).begin(),(x).end()

#define fi first

#define se second

#define SZ(x) ((int)(x).size())

typedef vector<int> VI;

typedef long long ll;

typedef pair<int,int> PII;

const ll mod=1000000007;

ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

// head



ll x,ret;

int main() {

	scanf("%lld",&x);

	ret=(x/11)*2;

	if (x%11>=1&&x%11<=6) ret++;

	else if (x%11>6) ret+=2;

	printf("%lld\n",ret);

}
// Slower C++ solution:
#include<set>

#include<map>

#include<stack>

#include<queue>

#include<deque>

#include<cmath>

#include<cstdio>

#include<cctype>

#include<string>

#include<vector>

#include<cstdlib>

#include<cstring>

#include<sstream>

#include<iostream>

#include<algorithm>

#define MAXN 100000



using namespace std;

//int a[7][2]={0,0,1,0,2,1,3,1,4,1,5,1,6,2};

int main()

{

	long long x,ans=0;

	cin>>x;

	ans+=x/11*2;

	x%=11;

	if(x>0)

	{

		if(x>6)

			ans++;

		ans++;

	}

	cout<<ans;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.251283842228499x):
#include <cstdio>

#include <cstring>

#include <cmath>

#include <algorithm>

#include <vector>

#include <string>

#include <map>

#include <set>

#include <cassert>

using namespace std;

#define rep(i,a,n) for (int i=a;i<n;i++)

#define per(i,a,n) for (int i=n-1;i>=a;i--)

#define pb push_back

#define mp make_pair

#define all(x) (x).begin(),(x).end()

#define fi first

#define se second

#define SZ(x) ((int)(x).size())

typedef vector<int> VI;

typedef long long ll;

typedef pair<int,int> PII;

const ll mod=1000000007;

ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

// head



ll x,ret;

int main() {

	scanf("%lld",&x);

	ret=(x/11)*2;

	if (x%11>=1&&x%11<=6) ret++;

	else if (x%11>6) ret+=2;

	printf("%lld\n",ret);

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cmath>

#include <cstring>

#include <algorithm>

#include <vector>

#include <map>

#include <cstdlib>

#include <set>

#include <stack>

#include <queue>

using namespace std;



#define X first

#define Y second

#define N 100010

#define M 400010

typedef long long ll;

typedef pair<int,int> pii;

const int Mod=1000000007;



ll Solve(ll x)

{

	if (x<=6) return 1;

	if (x<=11) return 2;

	

	ll ans=x/11*2; x%=11;

	if (x==0) return ans;

	if (x<=6) return ans+1;

	return ans+2;

}



int main()

{

	//freopen("in.in","r",stdin);

	//freopen("out.out","w",stdout);

	

	ll x; 

	cin >> x;

	cout<< Solve(x)<<endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2624473805228345x):
#include<cstdio>

typedef long long ll;

int main(){

  ll x,ans;

  scanf("%lld",&x);

  ans=x/11*2;

  if (x%11!=0)

    if (x%11>6)

      ans+=2;

    else

      ans++;

  printf("%lld\n",ans);

}
// Slower C++ solution:
#include<set>

#include<map>

#include<stack>

#include<queue>

#include<deque>

#include<cmath>

#include<cstdio>

#include<cctype>

#include<string>

#include<vector>

#include<cstdlib>

#include<cstring>

#include<sstream>

#include<iostream>

#include<algorithm>

#define MAXN 100000



using namespace std;

//int a[7][2]={0,0,1,0,2,1,3,1,4,1,5,1,6,2};

int main()

{

	long long x,ans=0;

	cin>>x;

	ans+=x/11*2;

	x%=11;

	if(x>0)

	{

		if(x>6)

			ans++;

		ans++;

	}

	cout<<ans;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.252607390899336x):
#include<cstdio>

typedef long long ll;

int main(){

  ll x,ans;

  scanf("%lld",&x);

  ans=x/11*2;

  if (x%11!=0)

    if (x%11>6)

      ans+=2;

    else

      ans++;

  printf("%lld\n",ans);

}
// Slower C++ solution:
#include<cstdio>  

#include<iostream>  

#include<algorithm>  

#include<cstdlib>  

#include<cstring>

#include<string>

#include<climits>

#include<vector>

#include<cmath>

#define LL long long



using namespace std;



inline char nc(){

  static char buf[100000],*p1=buf,*p2=buf;

  if (p1==p2) { p2=(p1=buf)+fread(buf,1,100000,stdin); if (p1==p2) return EOF; }

  return *p1++;

}



inline void read(int &x){

  char c=nc(),b=1;

  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;

  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;

}



inline void read(LL &x){

  char c=nc(),b=1;

  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;

  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;

}



int wt,ss[19];

inline void print(int x){

	if (x<0) x=-x,putchar('-'); 

	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}

}

inline void print(LL x){

	if (x<0) x=-x,putchar('-');

	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}

}



LL n,m;



int main()

{

	cin>>n;

	m=n/11;

	if (n-11*m==0) cout<<2*m<<endl;

	else if (n-11*m>6) cout<<2*m+2<<endl;

	else cout<<2*m+1<<endl;

 

 return 0;

 

}

// Faster C++ solution for the same problem (measured speedup: 5.26315486929145x):
#include<cstdio>

typedef long long ll;

int main(){

  ll x,ans;

  scanf("%lld",&x);

  ans=x/11*2;

  if (x%11!=0)

    if (x%11>6)

      ans+=2;

    else

      ans++;

  printf("%lld\n",ans);

}
// Slower C++ solution:
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <iostream>

#include <algorithm>

typedef long long ll;

#define rep(i, a, b) for (int i = a; i <= b; ++ i)

const ll inf = 1000000000000000007LL;

using namespace std;

ll w[10][10], ans[10][10], tmp[10][10], m;

bool solve(ll n) {

	rep(i, 1, 6) rep(j, 1, 6) w[i][j] = - inf;

	rep(i, 1, 6) rep(j, 1, 6) if (i != j && i + j != 7) w[j][i] = i;

	bool flg = true;

	for ( ; n; n /= 2) {

		if (n & 1LL) {

			if (flg) {

				memcpy(ans, w, sizeof(w));

				flg = false;

			} else {

				rep(i, 1, 6) rep(j, 1, 6) tmp[i][j] = - inf;

				rep(i, 1, 6) rep(j, 1, 6) rep(k, 1, 6) 

					tmp[i][j] = max(tmp[i][j], ans[i][k] + w[k][j]);

				memcpy(ans, tmp, sizeof(tmp));

			}

		}

		rep(i, 1, 6) rep(j, 1, 6) tmp[i][j] = - inf;

		rep(i, 1, 6) rep(j, 1, 6) rep(k, 1, 6)

			tmp[i][j] = max(tmp[i][j], w[i][k] + w[k][j]);

		memcpy(w, tmp, sizeof(tmp));

	}

	ll mx = - inf;

	rep(i, 1, 6) rep(j, 1, 6) mx = max(mx, ans[i][j]);

	return (mx >= m);

}

int main() {

	scanf("%lld", &m);

	ll l = 1, r = inf, ans;

	for ( ; l <= r; ) {

		ll mid = (l + r) / 2;

		if (solve(mid)) ans = mid, r = mid - 1;

			else l = mid + 1;

	}

	printf("%lld\n", ans); 

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.5260764634816535x):
#include <set>

#include <map>

#include <queue>

#include <ctime>

#include <cmath>

#include <cstdio>

#include <vector>

#include <string>

#include <cctype>

#include <bitset>

#include <cstring>

#include <cstdlib>

#include <utility>

#include <iostream>

#include <algorithm>

#define REP(i,a,b) for(int i=(a);i<=(b);i++)

#define PER(i,a,b) for(int i=(a);i>=(b);i--)

#define RVC(i,S) for(int i=0;i<(S).size();i++)

#define RAL(i,u) for(int i=fr[u];i!=-1;i=e[i].next)

using namespace std;

typedef long long LL;

typedef pair<int,int> pii;

     

template<class T> inline

void read(T& num) {

    bool start=false,neg=false;

    char c;

    num=0;

    while((c=getchar())!=EOF) {

        if(c=='-') start=neg=true;

        else if(c>='0' && c<='9') {

            start=true;

            num=num*10+c-'0';

        } else if(start) break;

    }

    if(neg) num=-num;

}

/*============ Header Template ============*/

 

int main() {

    LL n;

    read(n);

    LL m=2*(n/11);n%=11;

    if(n) {

        if(n<=6) m+=1; else m+=2;

    }

    printf("%lld\n",m);

    return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <iostream>

#include <algorithm>

typedef long long ll;

#define rep(i, a, b) for (int i = a; i <= b; ++ i)

const ll inf = 1000000000000000007LL;

using namespace std;

ll w[10][10], ans[10][10], tmp[10][10], m;

bool solve(ll n) {

	rep(i, 1, 6) rep(j, 1, 6) w[i][j] = - inf;

	rep(i, 1, 6) rep(j, 1, 6) if (i != j && i + j != 7) w[j][i] = i;

	bool flg = true;

	for ( ; n; n /= 2) {

		if (n & 1LL) {

			if (flg) {

				memcpy(ans, w, sizeof(w));

				flg = false;

			} else {

				rep(i, 1, 6) rep(j, 1, 6) tmp[i][j] = - inf;

				rep(i, 1, 6) rep(j, 1, 6) rep(k, 1, 6) 

					tmp[i][j] = max(tmp[i][j], ans[i][k] + w[k][j]);

				memcpy(ans, tmp, sizeof(tmp));

			}

		}

		rep(i, 1, 6) rep(j, 1, 6) tmp[i][j] = - inf;

		rep(i, 1, 6) rep(j, 1, 6) rep(k, 1, 6)

			tmp[i][j] = max(tmp[i][j], w[i][k] + w[k][j]);

		memcpy(w, tmp, sizeof(tmp));

	}

	ll mx = - inf;

	rep(i, 1, 6) rep(j, 1, 6) mx = max(mx, ans[i][j]);

	return (mx >= m);

}

int main() {

	scanf("%lld", &m);

	ll l = 1, r = inf, ans;

	for ( ; l <= r; ) {

		ll mid = (l + r) / 2;

		if (solve(mid)) ans = mid, r = mid - 1;

			else l = mid + 1;

	}

	printf("%lld\n", ans); 

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.5232676022177594x):
    //============================================================================

    // Name        : test.cpp

    // Author      : Qihan

    // Version     :

    // Copyright   : Your copyright notice

    // Description : Hello World in C++, Ansi-style

    //============================================================================

     

    #include <bits/stdc++.h>

    using namespace std;

    typedef long long int LLI;

    typedef pair<int,int> PII;

    const int maxs = (10000 + 10);

    int main(){

    //	freopen("/home/qihan/Documents/in","r",stdin);

    	LLI x,y;

    	scanf("%lld",&x);

    	LLI cnt = x / 11 * 2;

    	y = x % 11;

    	if(y > 6)	cnt += 2;

    	else if(y <= 6 && y >= 1)	cnt += 1;

    	printf("%lld\n",cnt);

    	return 0;

    }
// Slower C++ solution:
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <iostream>

#include <algorithm>

typedef long long ll;

#define rep(i, a, b) for (int i = a; i <= b; ++ i)

const ll inf = 1000000000000000007LL;

using namespace std;

ll w[10][10], ans[10][10], tmp[10][10], m;

bool solve(ll n) {

	rep(i, 1, 6) rep(j, 1, 6) w[i][j] = - inf;

	rep(i, 1, 6) rep(j, 1, 6) if (i != j && i + j != 7) w[j][i] = i;

	bool flg = true;

	for ( ; n; n /= 2) {

		if (n & 1LL) {

			if (flg) {

				memcpy(ans, w, sizeof(w));

				flg = false;

			} else {

				rep(i, 1, 6) rep(j, 1, 6) tmp[i][j] = - inf;

				rep(i, 1, 6) rep(j, 1, 6) rep(k, 1, 6) 

					tmp[i][j] = max(tmp[i][j], ans[i][k] + w[k][j]);

				memcpy(ans, tmp, sizeof(tmp));

			}

		}

		rep(i, 1, 6) rep(j, 1, 6) tmp[i][j] = - inf;

		rep(i, 1, 6) rep(j, 1, 6) rep(k, 1, 6)

			tmp[i][j] = max(tmp[i][j], w[i][k] + w[k][j]);

		memcpy(w, tmp, sizeof(tmp));

	}

	ll mx = - inf;

	rep(i, 1, 6) rep(j, 1, 6) mx = max(mx, ans[i][j]);

	return (mx >= m);

}

int main() {

	scanf("%lld", &m);

	ll l = 1, r = inf, ans;

	for ( ; l <= r; ) {

		ll mid = (l + r) / 2;

		if (solve(mid)) ans = mid, r = mid - 1;

			else l = mid + 1;

	}

	printf("%lld\n", ans); 

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4836786301425058x):
#include <bits/stdc++.h>

using namespace std;



using VS = vector<string>;    using LL = long long;

using VI = vector<int>;       using VVI = vector<VI>;

using PII = pair<int, int>;   using PLL = pair<LL, LL>;

using VL = vector<LL>;        using VVL = vector<VL>;



#define ALL(a)  begin((a)),end((a))

#define RALL(a) (a).rbegin(), (a).rend()

#define PB push_back

#define EB emplace_back

#define MP make_pair

#define SZ(a) int((a).size())

#define SORT(c) sort(ALL((c)))

#define RSORT(c) sort(RALL((c)))

#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))

#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)

#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--)

#define debug(x) cerr << #x << ": " << x << endl

const int INF = 1e9;                          const LL LINF = 1e16;

const LL MOD = 1000000007;                    const double PI = acos(-1.0);

int DX[8] = { 0, 0, 1, -1, 1, 1, -1, -1 };    int DY[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };



/* -----  2018/02/14  Problem: 068_arc_a / Link: https://arc068.contest.atcoder.jp/tasks/arc068_a?lang=en  ----- */

/* ------問題------







-----問題ここまで----- */

/* -----解説等-----







----解説ここまで---- */



LL N;



LL ans = 0LL;



int main() {

	cin.tie(0);

	ios_base::sync_with_stdio(false);



	cin >> N;

	ans = (N) / 11LL*2;

	int left = N % 11;

	if (left > 6)ans += 2;

	else if (left > 0)ans += 1;

	cout << ans << "\n";



	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long int64;



int64 memo[1111][1111];



 



int64 dfs(int i,int cnt);



string t,b;



 



int main(){



  for(int i = 0;i < 1111;i++){



    for(int j = 0;j < 1111;j++){



      memo[i][j] = -1;



    }



  }



  t += '0';



  string a;



  cin >> a >> b;



  t += a;



  cout << dfs(0,0) << endl;



  return 0;



}



 



int64 dfs(int i,int cnt){



  int rec = 0;



  if(cnt == b.size())return 1;



  if(memo[i][cnt] != -1)return memo[i][cnt];



  for(int j = i + 1;j < t.size();j++){



    if(t[j] == b[cnt])rec = (rec + dfs(j,cnt + 1)) % 1000000007;



  }



  return memo[i][cnt] = rec % 1000000007;



}

// Faster C++ solution for the same problem (measured speedup: 1.1846789715875252x):
#include <bits/stdc++.h>

using namespace std;

 

#define int long long 

 

main()

{

  string s, r;

  int dp[1005][1005] = {};

  int mod = 1000000007;

   

  dp[0][0] = 1;

   

  cin >> s >> r;

   

  for(int i = 0; i < s.size(); i++) {

    for(int j = 0; j <= r.size(); j++) {

      (dp[i + 1][j] += dp[i][j]) %= mod;

      if(j != r.size() && s[i] == r[j]) (dp[i + 1][j + 1] += dp[i][j]) %= mod;

    }

  }

 

  cout << dp[s.size()][r.size()] << endl;

 

  return (0);

}