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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    int coin = 0;
    for(int i=1; ; i++){
        coin += a;
        if(i%7 == 0) coin += b;
        if(coin >= c){
            cout << i << endl;
            break;
        }
    }
    return 0;
}

C++: #include <iostream>

#define DAY 7 

using namespace std;

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

  int coin = 0;
  int i = 0;
  while(coin < C) {
    i++;
    coin += A;
    if(i % DAY == 0) coin += B;
  }

  cout << i << endl;

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>

static const int MOD = 1000000007;
using ll = int64_t;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    ll a, b, c;
    cin >> a >> b >> c;
    ll ng = 0, ok = INF<int>;
    while(ok-ng>1){
        int mid = (ok+ng)/2;
        ll k = mid*a+(mid/7)*b;
        (k >= c ? ok : ng) = mid;
    }
    cout << ok << "\n";
    return 0;
}

C++: #include <iostream>

using namespace std;

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

  int day = 0;
  int sum = 0;

  while (sum < c) {
    ++day;
    sum += (day % 7 == 0) ? a + b : a;
  }

  cout << day << endl;
}

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

int main(void){
    long long int a,b,c,day=0,cur=0;
    cin >> a>>b>>c;
    while(cur<c){
        day++;
        cur+=a;
        if(day%7==0&&day!=0) cur+=b;
    }
    cout << day << endl;
}

C++: #include <iostream>

int getMinIteration(const int& a, const int& b, const int& c) {
	int ret = 0;
	int temp_total = 0;

	if (a <1 || b < 0|| c < 1) {
		std::cout <<"a or b or c exceed min"<< std::endl;
		return ret;
	}
	if ( 1000 < a || 1000 < b || 1000000 < c ) {
		std::cout<< "a or b or c exceed max"<< std::endl;
		return ret;
	}

	do {
		ret += 1;
		temp_total += a;
		if (ret%7 == 0) { temp_total += b; }
	} while (temp_total<c);
	return ret;
}


int main() {

	int i_a, i_b, i_c;
	std::cin >> i_a;
	std::cin >> i_b;
	std::cin >> i_c;

	auto min = getMinIteration(i_a, i_b, i_c);
	std::cout << min<<std::endl;

	return 0;
}

C++: #include <iostream>
#include <string.h>
using namespace std;
int main(){
    int A, B, C;
    int t;
    int D;
    cin>>A>>B>>C;
    t = 0;
    D = 7 * A;
    while(C>0)
    {
        if (C-D>0)
        {
            C = C-D-B;
            t += 7;
        }
        else
        {
            C -=A;
            t +=1;
            
        }
    }
    std::cout << t << std::endl;
}

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

int main(void){
  int a,b,c,w; // w:weekly total
  int ans,d;
  
  cin >> a >> b >> c;
  w = a*7+b;
  while (c>=w){
    ans += 7;
    c -= w;
  }
//  cout << ans << " " << c << endl;
  d=1;
  while (c>0){
    c -= a;
    if (d++==7) c -= b;
    ans++;
  }
  cout << ans << endl;
  return 0;
}

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

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

	int m = 0, day = 0;
	while(m < C) {
		day++;
		m += A;
		if(day%7 == 0) m += B;
	}
	cout << day << endl;
}