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>
using namespace std;

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

	int i = 0;
	int coin = 0;

	while( coin < C ) {
		++i;
		coin += A;

		if( i % 7 == 0 ) {
			coin += B;
		}
	}

	cout << i << endl;
}

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

#define FOR(i,start,end) for(int i=start; i<(int)(end); i++)
#define REP(i,n) FOR(i,0,n)
#define SIZE_OF_ARRAY(array)  (sizeof(array)/sizeof((array)[0]))

template<class T> void print(const T& value) { cout << value << "\n"; }

int main() {

    cin.tie(0);
    ios::sync_with_stdio(false);

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

    int has_coin = 0;
    int day = 0;
    while(has_coin < c) {
        day += 1;
        has_coin += a;
        if(day % 7 == 0) {
            has_coin += b;
        }
    }
    printf("%d\n", day);


    return 0;
}

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

int main() {
    int a, b, c; cin >> a >> b >> c;

    int ans = 0;
    int i = 0;
    while(ans < c) {
        i++;
        ans += a;
        if (i % 7 == 0 && i != 1) {
            ans += b;
        }
    }

    cout << i <<  endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include<cstring>
#include<queue>
#include<map>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
typedef long long int ll;

template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template<typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T& t, const V& v) { t = v; }
template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T& t, const V& v) {
	for (auto& e : t) fill_v(e, v);
}


#define ARRAY_MAX 105
const int INF = 1e9 + 7;



int main() {

	int a, b, c;
	cin >> a >> b >> c;

	int ans = 7 * (c / (7 * a + b));
	//cout << a << " " << b << " " << c << endl;
	c -= (7 * a + b) * (c / (7 * a + b));
	

	ans += c / a;
	if (c%a)
	{
		ans++;
	}

	cout << ans << endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<map>
#include<stack>
#include<cmath>
#include<iomanip>
#include<set>
#include<numeric>
#include<sstream>
#include<random>
#include<cassert>
#include<list>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, st, n) for (int i = st; i < n; ++i)
using pii = pair<int, int>;
const int inf = 1e9 + 7;
int dy[] = {1, 1, 0, -1, -1, 0};
int dx[] = {1, 0, -1, -1, 0, 1};
#define ceil(a, b) a / b + !!(a % b)

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    int weeks = c / (7 * a + b);
    int days= weeks * 7;
    int coins = days * a + weeks * b;
    int rest = c - coins;
    days += (rest + a - 1) / a;
    cout << days << endl;
}

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

int main()
{
    int a, b, c, sum=0, login=0, bonus=0;
    cin >> a >> b >> c;
    while(sum < c)
    {
        sum += a;
        login++;
        bonus++;
        if(bonus == 7)
        {
            sum += b;
            bonus = 0;
        }
    }
    cout << login << endl;
}