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>
using namespace std;
int main() {
    int A, B, C, ans = 0; cin >> A >> B >> C;
    while (C > 0) {
        ans++;
        if (ans % 7 != 0) {
            C -= A;
        } else {
            C -= (A+B);
        }
    }
    cout << ans << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,d=0,e=0,f=0;
  cin>>a>>b>>c;
  while(true){
    f++;
    d++;
    if(d==7){
      e=e+b;
      d=0;
    }
    e=e+a;
    if(e>=c){
      cout<<f<<"\n";
      break;
    }
  }
}

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

int main(void){
    int A,B,C;
    cin>>A>>B>>C;
    int coin_per_week=7*A+B;
    int day=0;

    day=(C/coin_per_week)*7;
    int rest=C%coin_per_week;
    if(rest==0){;}
    else if(rest<=A){day+=1;}
    else if(rest<=2*A){day+=2;}
    else if(rest<=3*A){day+=3;}
    else if(rest<=4*A){day+=4;}
    else if(rest<=5*A){day+=5;}
    else if(rest<=6*A){day+=6;}
    else{day+=7;}
    cout<<day<<endl;
    return 0;
}

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

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

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

#define int long long
#define endl "\n"
#define REP(i,a,n) for(int i=a;i<n;++i)
#define REPR(i,a,n) for(int i=a;i>n;--i)
#define RUP(a,b) ((a+b-1)/(b))
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define MOD 1000000007
#define INF LLONG_MAX/2

typedef long long ll;
typedef pair<int,int> Pii;
typedef tuple<int,int,int> Tiii;
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef vector<Pii> VPii;
typedef vector<string> Vs;

template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T> void YesNo(T a) {cout<<(a?"Yes":"No")<<endl;}
template<class T> void YESNO(T a) {cout<<(a?"YES":"NO")<<endl;}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
void uniq(Vi &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end());}
bool comp(Pii a,Pii b){
    if(a.second != b.second) return a.second<b.second;
    else return a.first<b.first;
}

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

    int now=0,ans=0;
    while(now<c){
        now+=a;
        if(ans%7==6) now+=b;
        ans++;
    }
    cout<<ans<<endl;
    return 0;
}

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

int main() {
	int A, B, C, sum = 0;
	cin >> A >> B >> C;
	for (int i = 1; i <= 10000000; i++) {
		if (i % 7 == 0) sum += B;
		sum += A;
		if (sum >= C) { cout << i << endl; break; }
	}
	return 0;
}

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

int main(){
	long int da, we, ta;
	long int ans;
	cin>>da>>we>>ta;

	long int to_we;
	to_we=da*7+we;
	
	long int ex_we;
	long int re_we;
	ex_we=ta/to_we;
	re_we=ta%to_we;
	
	if(ex_we*to_we>ta)
	{
		ans=ex_we*7;
	}
	else
	{
		long int ad_da;
		ad_da=re_we/da;
		if(ad_da>=7)
			ans=ex_we*7+7;
		else
		{
			ans=ex_we*7+ad_da;
			if(ex_we*to_we+da*ad_da<ta)
				ans++;
		}
	}
	cout<<ans<<endl;
	
	return 0;
}

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

C++: #include <iostream>
using namespace std;
 int main(void){
   int a,b,c;
   cin >> a >> b >> c;
   int score =0;
   for (int day=1; ; day++){
       score+=a;
       if(day %7==0){
           score +=b;
           
       }
       if(score >=c){
           cout << (day) << endl;
           break;
       }
   }
 }

C++: #include <iostream>

using namespace std;

int main(void){
    int a,b,c,day,dd;
    cin >> a >> b >> c;
    day=0;
    day += 7*(c/(7*a+b));
    c = c%(7*a+b);
    dd = c/a;
    if(dd>=7){
        day+=7;
    }else{
        if(c%a!=0){
            day++;
        }
        day+=dd;
    }
    cout << day << endl;
}

C++: #include<stdio.h>
int main() {
	int a, b, c;
	int  i = 0, l = 0;
	scanf("%d %d %d", &a, &b, &c);
	while (1) {
		l++;
		if (l% 7 == 0)i += b;
		i += a;
		if (i >= c) {
			printf("%d\n", l); break;
		}
	}
}

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

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

    while(C>sum){
        for(int i=0; i<7; i++){
            if(C>sum){
                day++;
            }
            sum+=A;
        }
        sum+=B;
    }
    cout << day <<"\n";
    return 0;
}

C++: /*JOI君は最低C枚のコインを得たい.
→1日でA枚のコイン、7日でB枚追加.

i) B = 0の場合:
	日数に関係なく得たコインの枚数がC枚に到達するまでAを足し続ける.　→　足した回数を出力すればよい.

ii) B ≠ 0の場合:
	C枚に達するまでAを足し続けるが、足した回数が7の倍数になれば、追加でBを足す.　→　足した回数を出力.

まとめると:
	・枚数がCに達するまでAを足す.　…　いつCに達するか分からない.　→　while文を使うべき.
	・もし足した回数が7の倍数になれば、Bを足す.
	・これらを実行し、回数や得たコインの枚数は何かの変数に入れる. 　→　得たコインの枚数がCを超えれば、breakする.
*/
#include <iostream>
using namespace std;

int main() {
	//入力.
	long A, B, C; cin >> A >> B >> C;
	//得たコインの枚数と、回数を記録する変数を用意.
	//0で初期化する必要がある.
	int sum = 0, ans = 0;
	//ログイン.
	while (true) {
		sum += A;
		ans++;
		if (ans % 7 == 0) sum += B;
		if (C <= sum) break;
	}
	//出力.
	cout << ans << endl;
}

C++: #include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
#include<functional>
#include<utility>
#include<bitset>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<cstdio>

using namespace std;

#define REP(i,n) for(int i=0;i<int(n);i++)
#define foreach(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
typedef long long ll;
typedef pair<int,int> P;

int main(void){
	          int i;

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

	          int A,B,C;
	          cin >> A >> B  >> C;

	          int q=C/(7*A+B),r=C%(7*A+B);
	          if(r<=7*A) r=(r+A-1)/A;
	          else r=7;

	          cout << 7*q+r << endl;

	          return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int A,B,C;

  cin >> A >> B >> C;
  int Day=0;

  while(C>0){
    Day+=1;
    if(Day%7==0){
      C=C-A;
      C=C-B;
    }
    else{
      C=C-A;
    }
  }

  cout << Day << "\n";
}

C++: #include <iostream>

int main(){
    
    int a,b,c;
    int coins = 0;
    int days = 1;
    std::cin >> a >> b >> c;
    
    while(1){
        coins += a;
        if(days % 7 == 0){
            coins += b;
        }
        
        if(coins >= c)break;
        days++;
    }
    
    std::cout << days << "\n";
    return 0;
}

C++: #include <stdio.h>
#include<vector>
#include<iostream>
#include<string>
#include<deque>
#include<queue>
#include<stack>
#include<list>
#include<cmath>
using namespace std;


int main() {
	
	int a, b, c,d,e,f;

	cin >> a >> b >> c;
	d = a * 7 + b;
	e = c / d*7;
	if (c%d <= a * 6)
	{
		f = (c % d+(a-1))/a;
	}
	else
	{
		f = 7;
	}cout <<e+f<< endl;
	return 0;
}