Go: package main

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

func oneLineInt(s string) []int {
	temp := strings.Split(s, " ")
	// fmt.Println(len(temp))
	ints := []int{}
	for _, elem := range(temp) {
		int_elem, _ := strconv.Atoi(elem)
		ints = append(ints, int_elem)
	}
	return ints
}

func coinCount(ints []int) int {
	cons := ints[0]
	bonus := ints[1]
	target := ints[2]
	count := 0
	day := 0
	var dc int
	for day_count, _ := range(make([]int, target)) {
		day++
		if day % 7 == 0 {
			count += bonus
		}
		count += cons
		if count >= target {
			dc = day_count + 1
			break
		}
	}
	return dc
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var txt string
	if scanner.Scan() {
		txt = scanner.Text()
	}
	ints := oneLineInt(txt)
	// fmt.Println(ints[1])
	// fmt.Println(reflect.TypeOf(ints[0]))
	result := coinCount(ints)
	fmt.Println(result)
}

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

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

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

int main() {
    int a, b, c, ans=0;
	cin >> a >> b >> c;
	while(a*ans+b*(ans/7)<c){
		ans++;
	}
	cout << ans << endl;
    return 0;
}

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

int main() {
	int A, B, C, ans = 0, sum = 0;
	cin >> A >> B >> C;
	while (C > sum) {
		++ans;
		sum += A;
		if (ans % 7 == 0) sum += B;
	}
	cout << ans << endl;
}

C++: #include <iostream>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(void){
    // Your code here!
    int a,b,c;
    int login=0;
    cin >> a >> b >> c;
    rep(i,1000000){
        if(c-a>0){ c-=a; login++;}
        else{ login++; break; }
    
        if(c-b>0){
            if((i+1)%7==0) c-=b;
        }else{
            if((i+1)%7==0) break;
        }    
    }
    cout << login <<endl;
}

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

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

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

int main()
{
    int a,b,c; cin >> a >> b >>c;
    int per_week = 7*a + b;
    int week = c/per_week;
    int remain = c - week*per_week;
    
    int ans= 0;
    
    ans = (remain + a -1 )/a;
    if(ans >7) ans=7;
    ans += 7*week;
    
    

    cout << ans << endl;
    


    return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main(void)
{
	int a,b,c,i,cnt;
	cnt=0;
	cin>>a>>b>>c;
	while(1){
		if(c<=0) break;
		c=c-a;
		cnt=cnt+1;
		if(cnt%7==0) c=c-b;
	}
	cout<<cnt<<endl;
	return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
int main() {
	long long A, B, C;
	cin >> A >> B >> C;
	long long ans = 0, num = 0;
	while (num < C) {
		ans++;
		num += A;
		if (ans % 7 == 0) num += B;
	}
	cout << ans << endl;
}

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

int main(){
	int a,b,c;cin>>a>>b>>c;
int x=7*a+b,cnt=0;
cnt+=c/x*7;int y=c%x;if(y>0)cnt+=min((y-1+a)/a,7);
cout<<cnt<<endl;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<utility>
#include<deque>
#include<iomanip>
using namespace std;


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

	cin >> A >> B >> C;

	int week = C / (A * 7 + B);

	C -= (A * 7 + B) * week;

	int day = (C / A >= 7) ? 7 : (C % A == 0) ? C / A : C / A + 1;

	cout << week * 7 + day << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;




int main(){

	int A,B,C;

	scanf("%d %d %d",&A,&B,&C);

	int ans = C,left = 0,right= C,mid = (left+right)/2;

	while(left <= right){

		if(mid*A+mid/7*B >= C){

			ans = mid;
			right = mid-1;

		}else{

			left = mid+1;
		}
		mid = (left+right)/2;
	}

	printf("%d\n",ans);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
    int a,b,c,sum=0,n;
    cin >> a >> b >>c;
    for(int i=0; ; i++){
        sum=i*a+i/7*b;
        if(c<=sum){
            cout << i << endl;
            break;
        }
    }
}

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

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

    return 0;
}

C++: #include <iostream>

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

  int ans = 0;
  while (true) {
    if (c <= 0) {
      break;
    }
    c -= a;
    ans += 1;
    if (ans % 7 == 0) {
      c -= b;
    }
  }

  std::cout << ans << std::endl;

  return (0);
}