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<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;

int a, b, c, cnt, tmp;


int main() {

	cin >> a >> b >> c;

	while (c > tmp) {
		cnt++;
		tmp += a;
		if (cnt % 7 == 0)tmp += b;
	}

	cout << cnt << endl;

	return 0;
}

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

int main() {
	ll a,b,c;
	ll day = 1,coin=0;
	cin >> a >> b >> c;

	while (true) {
	
		if (day % 7 == 0)
			coin += a + b;
		else
			coin += a;

		if (c <= coin)
			break;

		day++;
	}

	cout << day << endl;
		
}

C++: #include <iostream>
using namespace std;
int main(void){
    int x, y, z, w, u;
    w = 0,u = 0; 
    cin >> x >> y >> z;
    while(true){
        u += 1;
        w += x;
        if(u%7 == 0){
           w += y;
        }
        if (w >= z){
           break;
        }
    }
    cout << u <<endl;
}

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