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 <iostream>

int main() {
  long coins_per_day, coins_per_week, goal;
  std::cin >> coins_per_day >> coins_per_week >> goal;

  long n_days = 0;
  while (n_days * coins_per_day + n_days / 7 * coins_per_week < goal) {
    ++n_days;
  }

  std::cout << n_days << '\n';
}

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
#define rrep(i, n) for(int i=n-1; i>=0; i--)
#define FOR(i, a, b) for(int i=a; i<b; i++)
#define ALL(v) v.begin(),v.end()
#define pb push_back
#define eb emplace_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LLINF = 1e18;
const ll MOD = 1e9+7;
const double EPS = 1e-10;
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; }

const ll MAX = 1000010;
ll maisu[MAX];

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

    for (int i = 1; i < MAX; i++) {
        maisu[i] = maisu[i-1] + a;
        if (i % 7 == 0) maisu[i] += b;
    }
    rep(i, MAX) {
        if (maisu[i] >= c) {
            cout << i << endl;
            return 0;
        }
    }
}

C++: #include<iostream>

using namespace std;
int main(){
        long long a, b, c,w,d,da;
        cin >> a >> b >> c;
        w = c / (a*7+b);
        d = c % (a*7+b);
        da = d % a;
        d = d / a;
        if (da != 0) d++;
        if (d > 7) d = 7;
        cout << (w*7 + d) << endl;
        return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<stack>
#include<queue>
#include<string>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;(i)<(n);(i)++)
#define FOR(i,m,n) for(int i=(m);(i)<(n);(i)++)
typedef long long ll;

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

C++: // Undone
#include <bits/stdc++.h>
#define int long long
#define double long double
#define INF 1e18
#define MOD 1000000007
using namespace std;
signed main() {
  int A, B, C;
  cin >> A >> B >> C;
  int ans = 0;
  while (C > 0) {
    ans++;
    C -= A;
    if (ans % 7 == 0) {
      C -= B;
    }
  }
  cout << ans << endl;
}

C++: #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     @hamayanhamayan
　　　　／　　　＼　 　  |　|
　　　 /　　 /￣￣￣￣/　　|
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
　 　　　＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/














int A, B, C;
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> A >> B >> C;

	int coin = 0;
	rep(day, 1, C + 1) {
		coin += A;
		if (day % 7 == 0) coin += B;
		if (C <= coin) {
			cout << day << endl;
			return;
		}
	}
}

C++: #include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long; using ull = unsigned long long;
//#define int ll
using vb = vector<bool>; using vvb = vector<vb>;
using vi = vector<int>; using vvi = vector<vi>;
using vl = vector<ll>; using vvl = vector<vl>;
template<class T> using V = vector<T>;
template<class T> using VV = vector<V<T>>;
#define fi first
#define se second
#define maxs(x,y) (x=max(x,y))
#define mins(x,y) (x=min(x,y))
using pii = pair<int,int>; using pll = pair<ll,ll>;
#define FOR(i,a,b) for(ll i = (a); i < (ll)(b); ++i)
#define REP(i,n) FOR(i,0,n)
#define RFOR(i,a,b) for(ll i = (ll)(b)-1;i >= a;--i)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define eb(val) emplace_back(val)
const double PI = acos(-1), EPS = 1e-10;
const ll MOD = 1e9+7;
void cioacc(){//accelerate cin/cout
  cin.tie(0);
  ios::sync_with_stdio(false);
}
signed main(){
  int a,b,c;
  cin >> a >> b >> c;
  int coin = 0;
  int ans = 0;
  while(coin<c){
    coin += a;
    if(ans%7==6) coin += b;
    ans++;
  }
  cout << ans << endl;
}

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

using namespace std;

int main(){
	ll a, b, c, z=0, d=0;
	
	cin>>a>>b>>c;
	
	while(d<c){
		d+=a;
		z++;
		if(z%7==0) d+=b;
	}
	
	cout<<z<<endl;
}

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;

}