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 <iostream>
#include <stdio.h>

int main()
{
    int daily_point = 0;
    int weekly_point = 0;
    int goal_point = 0;
    
    std::cin >> daily_point;
    std::cin >> weekly_point;
    std::cin >> goal_point;
    
    const int total_weekly_point = daily_point * 7 + weekly_point;
    
    const int weekly_count = goal_point / total_weekly_point;
    
    const int nokori_point = goal_point - (total_weekly_point * weekly_count);
    int daily_count = (nokori_point) / daily_point + ((nokori_point) % daily_point == 0 ? 0 : 1);
    if(nokori_point > daily_point * 7)
    {
        daily_count = 7;
    }
    printf("%d\n",weekly_count * 7 + daily_count);
    
    return 0;
}

C++: #include <iostream>

using namespace std;

template <typename T>
T cin2var()
{
    T val;
    cin >> val;
    return val;
}

int main()
{
    const int A(cin2var<int>());
    const int B(cin2var<int>());
    const int C(cin2var<int>());
    int coin = 0;
    int day = 1;
    for (; coin < C; ++day) {
        coin += A;
        if (day % 7 == 0) {
            coin += B;
        }
    }
    --day;
    cout << day << endl;
    return 0;
}

C++: //id:miiifa (AOJ,PEどちらも)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF= 1LL << 60;
#define REP(i,n) for(ll i=0; i<n; i++)
#define FOR(i,a,n) for(ll i=a; i<n; i++)
int main(){
    int a,b,c;
    cin >> a >> b >> c;
    int m=0;
    int i=1;
    while(1){
        m+=(i%7==0)?a+b:a;
        // cout << m << endl;
        if(m>=c){
            cout << i << endl;
            return 0;
        }
        i++;
    }
}

C++: #include<stdio.h>

int main(void){
int A,B,C,days,coin;

scanf("%d %d %d",&A,&B,&C);
days=0;
coin=0;
while( coin < C){
days++;
coin = coin + A ;
if(days % 7 == 0){ coin = coin + B;}
}
printf("%d\n",days);
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,count=0;
  cin>>A>>B>>C;
  while(1){
    count+=1;
    C = C - A;
    if(count%7==0) C = C - B;
    if(C <= 0) break;
    }
  cout<<count<<endl;
  return 0;
}

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

using namespace std;

#define int long long
#define endl '\n'
#define MOD 1000000007
#define maxn 100010

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

    int ans = 0;
    for (int i = 1;; i++) {
        ans += a;
        if (i % 7 == 0)
            ans += b;
        if (ans >= c) {
            cout << i << endl;
            return;
        }
    }
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}

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

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)

using namespace std;

typedef long long ll;

bool LT(double a,double b) { return !equals(a,b) && a < b; }
bool LTE(double a,double b) { return equals(a,b) || a < b; }


void compute() {

}

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

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	int i,f;
	i = 0;
	f = 0;
	while (f < c) {
		i++;
		f = f + a;
		if (i % 7 == 0)f = f + b;
	}
	printf("%d\n", i);
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
typedef long long int ll;
using namespace std;

int main(){
	int a,b,c; cin >>a>>b>>c;
	int ans=c/(7*a+b)*7+min(7,(c-c/(7*a+b)*(7*a+b)+(a-1))/a);
	cout << ans << endl;
}

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

template <typename T1, typename T2>
long RoundUp(T1 C, T2 A){
	if(C%A != 0){
		return C/A + 1;
	}else{
		return C/A;
	}
}

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

	long OneWeekCoins = 7*A+B;	// 7日間連続ログインした際の獲得コイン数
	long Set1 = C/OneWeekCoins;
	long Set2 = Set1 + 1;
	long rest1 = C - Set1*OneWeekCoins;
	long ans1 = RoundUp(rest1, A) + 7*Set1;
	long ans2 = 7*Set2;

	if(ans1 < ans2){
		cout << ans1 << endl;
	}else{
		cout << ans2 << endl;
	}

}

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

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

C++: #include <iostream>

#define DAY 7 

using namespace std;

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

  int coin = 0;
  int i = 0;
  while(coin < C) {
    i++;
    coin += A;
    if(i % DAY == 0) coin += B;
  }

  cout << i << endl;

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>

static const int MOD = 1000000007;
using ll = int64_t;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    ll a, b, c;
    cin >> a >> b >> c;
    ll ng = 0, ok = INF<int>;
    while(ok-ng>1){
        int mid = (ok+ng)/2;
        ll k = mid*a+(mid/7)*b;
        (k >= c ? ok : ng) = mid;
    }
    cout << ok << "\n";
    return 0;
}

C++: #include <iostream>

using namespace std;

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

  int day = 0;
  int sum = 0;

  while (sum < c) {
    ++day;
    sum += (day % 7 == 0) ? a + b : a;
  }

  cout << day << endl;
}

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

int main(void){
    long long int a,b,c,day=0,cur=0;
    cin >> a>>b>>c;
    while(cur<c){
        day++;
        cur+=a;
        if(day%7==0&&day!=0) cur+=b;
    }
    cout << day << endl;
}

C++: #include <iostream>

int getMinIteration(const int& a, const int& b, const int& c) {
	int ret = 0;
	int temp_total = 0;

	if (a <1 || b < 0|| c < 1) {
		std::cout <<"a or b or c exceed min"<< std::endl;
		return ret;
	}
	if ( 1000 < a || 1000 < b || 1000000 < c ) {
		std::cout<< "a or b or c exceed max"<< std::endl;
		return ret;
	}

	do {
		ret += 1;
		temp_total += a;
		if (ret%7 == 0) { temp_total += b; }
	} while (temp_total<c);
	return ret;
}


int main() {

	int i_a, i_b, i_c;
	std::cin >> i_a;
	std::cin >> i_b;
	std::cin >> i_c;

	auto min = getMinIteration(i_a, i_b, i_c);
	std::cout << min<<std::endl;

	return 0;
}

C++: #include <iostream>
#include <string.h>
using namespace std;
int main(){
    int A, B, C;
    int t;
    int D;
    cin>>A>>B>>C;
    t = 0;
    D = 7 * A;
    while(C>0)
    {
        if (C-D>0)
        {
            C = C-D-B;
            t += 7;
        }
        else
        {
            C -=A;
            t +=1;
            
        }
    }
    std::cout << t << std::endl;
}

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

int main(void){
  int a,b,c,w; // w:weekly total
  int ans,d;
  
  cin >> a >> b >> c;
  w = a*7+b;
  while (c>=w){
    ans += 7;
    c -= w;
  }
//  cout << ans << " " << c << endl;
  d=1;
  while (c>0){
    c -= a;
    if (d++==7) c -= b;
    ans++;
  }
  cout << ans << endl;
  return 0;
}

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

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

	int m = 0, day = 0;
	while(m < C) {
		day++;
		m += A;
		if(day%7 == 0) m += B;
	}
	cout << day << endl;
}