Go: package main

import (
	"fmt"
)

func main() {
	var A, B, N int
	fmt.Scanf("%d %d %d", &A, &B, &N)

	login := 0
	week := 0
	sum := 0

	for sum < N {
		login++
		week++
		sum += A

		if week%7 == 0 {
			sum += B
			week = 0
		}
	}

	fmt.Println(login)
}

C++: #include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i,n) for (int i=0;i<(int)(n);i++)
#define codefor int test;scanf("%d",&test);while(test--)
#define yn(ans) if(ans)printf("Yes\n");else printf("No\n")
#define YN(ans) if(ans)printf("YES\n");else printf("NO\n")
#define umap unordered_map
#define uset unordered_set
using namespace std;
using ll = long long;
const int MOD=1000000007;
//入力系
void scan(int& a){scanf("%d",&a);}
void scan(long long& a){scanf("%lld",&a);}
template<class T> void scan(T& a){cin>>a;}
template<class T> void scan(vector<T>& vec){for(auto&& it:vec)scan(it);}
void in(){}
template <class Head, class... Tail> void in(Head& head, Tail&... tail){scan(head);in(tail...);}
//出力系
void print(const int& a){printf("%d",a);}
void print(const long long& a){printf("%lld",a);}
void print(const double& a){printf("%.15lf",a);}
template<class T> void print(const T& a){cout<<a;}
template<class T> void print(const vector<T>& vec){if(vec.empty())return;print(vec[0]);for(auto it=vec.begin();++it!= vec.end();){putchar(' ');print(*it);}}
void out(){putchar('\n');}
template<class T> void out(const T& t){print(t);putchar('\n');}
template <class Head, class... Tail> void out(const Head& head,const Tail&... tail){print(head);putchar(' ');out(tail...);}
//デバッグ系
template<class T> void dprint(const T& a){cerr<<a;}
template<class T> void dprint(const vector<T>& vec){if(vec.empty())return;cerr<<vec[0];for(auto it=vec.begin();++it!= vec.end();){cerr<<" "<<*it;}}
void debug(){cerr<<endl;}
template<class T> void debug(const T& t){dprint(t);cerr<<endl;}
template <class Head, class... Tail> void debug(const Head& head, const Tail&... tail){dprint(head);cerr<<" ";debug(tail...);}

int main(){
    int a,b,c,ans=0,coin=0;
    in(a,b,c);
    while(coin<c){
        ans++;
        coin+=a;
        if(ans%7==0)coin+=b;
        if(coin>=c){
            out(ans);
            return 0;
        }
    }
}

C++: #include <cstdio>

int main() {
	int A, B, C;
	scanf("%d%d%d", &A, &B, &C);
	int coins_per_week = A * 7 + B;
	int weeks = C / coins_per_week;
	int remains = C - weeks * coins_per_week;
	int answer = (remains + A - 1) / A;
	if(answer > 7) answer = 7;
	answer += weeks * 7;
	printf("%d\n", answer);
}

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


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

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void){
    // Your code here!
    ll a,b,c,x=0,i=0;
    cin>>a>>b>>c;
    
    while(x<c){
        x+=a;
        i++;
        if(i%7==0){
            x+=b;
        }
    }
    cout<<i<<endl;
}

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
using namespace std;
int main() {
	int n = 0, a, b, c, ans = 0;
	cin >> a >> b >> c;
	while (true) {
		ans++;
		n += a;
		if (ans % 7 == 0) {
			n += b;
		}
		if (n >= c) {
			cout << ans << endl;
			cin >> n; return 0;
		}
	}
}

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

using namespace std;
typedef long long ll;

int main(){
    
    ios_base::sync_with_stdio(0);
    int a,b,c;
    cin>>a>>b>>c;
    int sum=0,cnt=0;
    while(sum<c){
        sum += a;
        cnt++;
        if(cnt%7==0)    sum+=b;
    }
    cout<<cnt<<endl;
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<math.h>
#include<queue>
#include<set>
#include<map>
#include<random>
#include<functional>
#include<utility>

#define rep(i,n) for(int i=0; i<n; i++)
#define pb push_back
#define P pair<int, int>
#define PLI pair<ll, int>

using namespace std;

typedef long long ll;


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

	int w = A * 7 + B;
	int tmp = C / w * 7;
	int ans = tmp;
	ans += C%w / A;
	if (C%w%A) ans++;
	ans = min(ans, tmp + 7);

	cout << ans << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define enld '\n'
#define rep(i,n) for(int i=0; i<(n); i++)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[6] = {1, 0, -1, 0,1,-1};
const int dy[6] = {0, 1, 0, -1,1,-1};
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; }
// ---------------------------------------------------------------------------


int main(){
    int A,B,C;
    cin >> A >> B >> C;
    int week = A*7+B;
    int ans = (C/week)*7;
    C = C%week;
    if(C){
        ans += min(7,(C+A-1)/A);
    }
    cout << ans << enld;
    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int login(int a, int b, int c){
    int count = 0;
    while( c > 0 ){
        c -= a;
        count++;
        if(count % 7 == 0) c -= b;
    }
    
    return count;
    
}
int main(){
    int a, b, c;
    scanf("%d %d %d",&a, &b, &c);
    printf("%d\n",login(a, b, c));
    return 0;
    
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <iomanip>
#include <algorithm>
#define lint long long int
#define FOR(x, to) for(int x=0; x<(to); x++) // for簡略表記
#define DUMP(ar) for(int i=0; i<ar.size(); i++) cout << "[" << i << "]:" << ar[i] << endl // 配列一覧表示
#define COUT(x) cout << x << endl // 単要素出力
#define ALL(ar) ar.begin(), ar.end() // コンテナの全要素
#define LOOPD(i) cout << "ループ[" << i << "]回目---------------" << endl // ループ回数デバグ
using namespace std;
// cout << fixed << setprecision(4) で小数点以下4桁の桁そろえ
// cout << setw(5) << ... で表示形式を5桁に設定 5桁未満なら頭に空白がつく 5桁越なら先頭から5桁まで
// cout << setw(5) << setfill('0') << ... で空白部分の埋め文字に5を使う
// goto ANSWER; で最後へ飛ぶ
// getline(cin, [変数]); で空白など(ホワイトスペース)を含む入力
// cin >> ws; でそこまでに入力ストリームに残されたホワイトスペースを取り除く(=以降のgetlineの有効化)

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

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

    cout << day << endl;

    return 0;
}

/*
17D8101004B 日高 琉斗 Nishi3311 C++14

*/

C++: #include<iostream>

using namespace std;


int main(){

//	変数の宣言
	int A,B,C;
//	変数の入力
	cin >> A >> B >> C;
//	カウント変数の宣言
	int count;
//	合計コイン
	int sum = 0;

	for(count=1;sum < C;count++)
	{
//		コインの加算
		sum += A;
		if(count%7 == 0) sum += B;
	}
//	結果の出力
	cout << count-1 << "\n";

	return 0;
}

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

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

    return 0;
}