Go: package main

import (
	"fmt"
)

func calcDay(daily, bonus, req int) int {
	fullWcoin   := 7 * daily + bonus	//"週給"
	sixDaycoin := 6 * daily				//6日目まででもらえるコイン

	week := req / fullWcoin //必要満週数
	day := 0
	rem  := req % fullWcoin
		
		if sixDaycoin < rem && rem < fullWcoin {
			week++
		} else {
			day = rem / daily
				if rem % daily > 0 {
					day++
				}
		}

	return 7 * week + day
}

func main() {
	var daily, bonus, req int
		fmt.Scanf("%d %d %d",&daily ,&bonus ,&req)
		fmt.Printf("%d\n",calcDay(daily, bonus, req))
}

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

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

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

    int coin = 0;
    int days = 0;
    
    while(coin < c){
        days++;
        coin += a;
        if(days % 7 == 0){
            coin += b;
        }
    }

    cout << days << endl;
}

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

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

	int d = 0, j = 0;
	while (j < c)
	{
		d++;
		j += a;
		if (d % 7 == 0)
			j += b;
	}
	cout << d << endl;

	return 0;
}

C++: #include <iostream>

int main(int argc, char const *argv[]) {
  int A, B, C,coin=0, day=0;
  std::cin >> A >> B >> C;
  while(coin < C){
    day = day + 1;
    coin = coin + A;
    // + - * / %
    if(day % 7 == 0){
      coin = coin + B;
    }
  }
  std::cout << day << '\n';
}

C++: #include <iostream>
using namespace std;
int main(void){
    int daily, weekly, goal;
    int coins = 0;
    int N = 0;
    
    cin >> daily;
    cin >> weekly;
    cin >> goal;
    
    while(coins < goal){
        for(int i=0; i<7; i++){
            coins += daily;
            N++;
            
            if(coins>=goal){
                cout << N << "\n";
                return 0;
            }
        }
        
        coins += weekly;
        //N++;

        if(coins>=goal){
            cout << N << "\n";
            return 0;
        }        
    }
return 0;    
}

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

int main() {
  int A, B, C, P, N, Ans;
  cin >> A >> B >> C;
  P = 0;
  Ans = 0;
  N = 1000000;
  
  for (int i = 0; i < N; i++) {
    Ans++;
    P += A;
    if (Ans % 7 == 0) {
      P += B;
    }
    if (P >= C) {
      break;
    }
  }
  
  cout << Ans << endl;
  
  return 0;
}

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

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

  int ans = 0;
  while (true) {
    if (7 * a >= c) {
      ans += ceil((double)c / a);
      break;
    } else if (7 * a + b >= c) {
      ans += 7;
      break;
    } else {
      ans += 7;
      c -= 7 * a + b;
    }
  }

  cout << ans << endl;
}

C++: #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
const long long INFLL = 1LL << 60;
const int INFINT = 1 << 30;
const long long MOD = 1e9 + 7;

template <class T> void vecout(T V) {
    auto t = V.begin();
    while(t != V.end()) {
        cout << *t++;
        if(t != V.end()) cout << " ";
    }
    cout << endl;
};

int main() {
    int A, B, C, d = 0;
    cin >> A >> B >> C;
    int w = A * 7 + B;
    if(C >= w) {
        d = 7 * (C / w);
        C %= w;
    }
    d += (C > A * 7) ? 7 : ceil(C * 1.0 / A);

    cout << d << endl;
}

C++: #include <iostream>

using namespace std;

int main(){

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

  int day = 0;
  int coin = 0;

  while(coin < c){
    day++;
    if(day % 7 == 0){
      coin += b;
    }
    coin += a;
  }
  cout << day << '\n';

  

  return 0;
}

C++: #include<iostream>

using namespace std;

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

	int coin = 0, count = 0;
	while(true){
		count++;
		coin += (count%7!=0) ? a : a + b;
		if(coin>=c) break;
	}
	
	cout << count << endl;

	return 0;
}

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

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
  int a,b,c; cin >> a >> b >>c;
  long long cnt=0,ans=0;
  while(cnt<c){
    ans++;
    cnt+=a;
    if(ans%7==0) cnt+=b;
  }
  cout << ans << endl;

  return 0;
}

C++: #include <iostream>

using namespace std;

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