Go: package main

import (
	"fmt"
)

func main() {
	var A, B, N int
	fmt.Scanf("%d %d %d", &A, &B, &N)

	login := 0
	week := 0
	sum := 0

	for sum < N {
		login++
		week++
		sum += A

		if week%7 == 0 {
			sum += B
			week = 0
		}
	}

	fmt.Println(login)
}

C++: #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     @hamayanhamayan
　　　　／　　　＼　 　  |　|
　　　 /　　 /￣￣￣￣/　　|
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
　 　　　＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/














int A, B, C;
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> A >> B >> C;

	int coin = 0;
	rep(day, 1, C + 1) {
		coin += A;
		if (day % 7 == 0) coin += B;
		if (C <= coin) {
			cout << day << endl;
			return;
		}
	}
}

C++: #include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int A, B, C;
    cin >> A >> B >> C;
    int sum = 0, cnt = 0;
    REP(i, C) {
        ++cnt;
        sum += A;
        if (cnt % 7 == 0) sum += B;
        if (sum >= C) {
            cout << cnt << endl;
            break;
        }
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long; using ull = unsigned long long;
//#define int ll
using vb = vector<bool>; using vvb = vector<vb>;
using vi = vector<int>; using vvi = vector<vi>;
using vl = vector<ll>; using vvl = vector<vl>;
template<class T> using V = vector<T>;
template<class T> using VV = vector<V<T>>;
#define fi first
#define se second
#define maxs(x,y) (x=max(x,y))
#define mins(x,y) (x=min(x,y))
using pii = pair<int,int>; using pll = pair<ll,ll>;
#define FOR(i,a,b) for(ll i = (a); i < (ll)(b); ++i)
#define REP(i,n) FOR(i,0,n)
#define RFOR(i,a,b) for(ll i = (ll)(b)-1;i >= a;--i)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define eb(val) emplace_back(val)
const double PI = acos(-1), EPS = 1e-10;
const ll MOD = 1e9+7;
void cioacc(){//accelerate cin/cout
  cin.tie(0);
  ios::sync_with_stdio(false);
}
signed main(){
  int a,b,c;
  cin >> a >> b >> c;
  int coin = 0;
  int ans = 0;
  while(coin<c){
    coin += a;
    if(ans%7==6) coin += b;
    ans++;
  }
  cout << ans << endl;
}

C++: #include<bits/stdc++.h>
#define ll long long

using namespace std;

int main(){
	ll a, b, c, z=0, d=0;
	
	cin>>a>>b>>c;
	
	while(d<c){
		d+=a;
		z++;
		if(z%7==0) d+=b;
	}
	
	cout<<z<<endl;
}

C++: #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int main(void){
   int a, b, c, ans=1, cnt=0;
    std::cin >> a >> b >> c;
    while(true){
        cnt=cnt+a;
        if(ans%7==0){
            cnt=cnt+b;
        }
        //std::cout << cnt << endl;
        if(cnt>=c) break;
        ans++;
    }
    std::cout << ans << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int A,B,C,x,y,w;
    cin>>A>>B>>C;
    if(C<A*7){if(C%A==0){cout<<C/A<<endl;}else{
     cout<<C/A+1<<endl;}   
    }
    if(C>A*7){
        x=C/(7*A+B);
        y=C-x*(7*A+B);
        if(y%A==0){w=y/A;}else{w=y/A+1;}
        
        cout<<x*7+w<<endl;
    }
}

C++: #include <iostream>

int main(){
	long a, b, c, i = 1, total = 0;
	std::cin >> a >> b >> c;
	while (total < c) {
		total += a;
		if (i != 0 && ((i % 7) == 0)) total += b;
		i++;
	}

	std::cout << i - 1 << std::endl;
	return 0;
}

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

#define int long long
#define all(V) (V).begin(),(V).end()
#define umap unordered_map
#define uset unordered_set
#define br cout<<"\n";

const int MAXN=1e5+10, MOD=1e9+7;
int n,m;


signed main()
{
//	#ifndef ONLINE_JUDGE
//		freopen("./input.txt","r",stdin);
//		freopen("./output.txt","w",stdout);
//	#endif
	ios::sync_with_stdio(false); cin.tie(nullptr);
    int a,b,c;
    cin>>a>>b>>c;
    int days=0,mny=0;
    while(mny<c){
        if(mny+(7*a)+b<=c){
            mny+= 7*a;
            mny+=b;
            days+=7;
        }
        else{
            for(int i=1; i<=7; i++){
                mny+= a;
                if(i==7)mny+=b;
                days++;
                if(mny>=c)break;
            }
        }
        if(mny>=c)break;
    }
    cout<<days; br;

}

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

using namespace std;

int main()
{

    int sum, a, b;

    std::scanf("%d %d %d", &a, &b, &sum);
    int times = 0;
    int div = 0;

    if (sum > a * 7 + b) {
        div = sum / (a * 7 + b);
        times += 7 * div;
        sum -= ((a * 7 + b) * div);
    }


    if (sum > 6 * a) times += 7;
    else {
        times += (sum % a == 0) ? sum / a : sum / a + 1;
    }
    std::printf("%d\n", times);

    return 0;
}

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;

typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define DEBUG_ARR(v,n) cout<<#v<<":";REP(i,n)cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    int a,b,c;
    cin>>a>>b>>c;

    ll coins = 0;

    int day=0;
    do{
        day++;
        coins += a;
        if(day%7==0) coins += b;
    }while(coins<c);

    cout << day << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
  int A,B;
  long C;
  cin >> A >> B >> C;
  
  int cnt=0;
  for(int coin=0;coin<C;coin+=A){
    cnt++;
    if(cnt%7==0) coin+=B;
  }
  cout << cnt << endl;
}

C++: #include <iostream>
using namespace std;

int main(){
    int A, B, C;
    cin >> A >> B >> C;

    int res = 0;
    int count = 0;
    int week = 0;
    week = A * 7 + B;

    while (res + week <= C) {
        res += week;
        count += 7;
    }

    int rest = 0;
    rest = C - res;
    if (rest%A == 0){
        if (rest > 7*A){
            count += 7;
        } else {
            count += (rest/A);
        }
    } else {
        if (rest > 7*A){
            count += 7;
        } else {
            count += (rest/A) + 1;
        }
    }
    cout << count << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    int i;  
    cin>>a;
    cin>>b;
    cin>>c;
    d=c/a;
    i=c%a;
    if(d<7){
        if(i<0){
           cout<<d<<endl;
        }else{
           cout<<d+1<<endl; 
        }
    }else{
        e=c/(a*7+b);
        f=c%(a*7+b);
        g=f/a;
        h=f%a;
        if(h<0){
            cout<<e*7+g<<endl;
        }else{
            cout<<e*7+g<<endl;
        }
    }
}