Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func printArr(arr []string) {
	fmt.Println(strings.TrimRight(fmt.Sprintf("%+v", arr)[1:], "]"))
}

func main() {
	scanner.Split(bufio.ScanWords)

	coinDaily, _ := nextInt()
	coinWeekly, _ := nextInt()
	coinTarget, _ := nextInt()

	coinCurrent := 0
	i := 0
	for i = 0; i <= 1000000; i++ {
		coinCurrent += coinDaily
		if (i+1)%7 == 0 {
			coinCurrent += coinWeekly
		}
		if coinCurrent >= coinTarget {
			break
		}
	}
	fmt.Println(i + 1)
}

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;
        }
    }
}

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;
}