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++: /*17D8103001E Fukushima Emi persimmon8 c++ 19.10.31*/

#include<iostream>
using namespace std;

int min(int a,int b,int n){
  int c=0,m=0;

  if(n<a) return 1;
  else if(n<7*a){
    while(1){
      m+=a;
      c++;
      if(m>=n) break;
    }
    return c;
  }else{
    while(1){
      m+=a;
      c++;
      if(c%7==0) m+=b;
      if(m>=n) break;
    }
    return c;
  }
  return c;
}

int main(){
  int n,a,b;
  cin>>a>>b>>n;
  //cout<<n<<a<<b;
  
  int ans=min(a,b,n);
  cout<<ans<<endl;

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c;
    cin>>a>>b>>c;
    int ans = 0;
    int i=0;
    while(ans<c){
        
        i++;
        ans += a;
        if(i%7==0)ans+=b;
        
    }
    cout<<i<<endl;
}

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

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

C++: #include <bits/stdc++.h>
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
int dy[4] = { 1, 0, -1, 0 }, dx[4] = { 0, 1, 0, -1 };
const ll MOD = 1e9 + 7;
const ll INF = 1e9;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c;
    cin >> a >> b >> c;
    int sum = 0;
    int day = 0;
    while (sum < c) {
        day++;
        sum += a;
        if (day % 7 == 0)
            sum += b;
    }
    cout << day << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int A,B,C,k = 0,i,m = 0;
cin>>A>>B>>C;
while(1){
k = m/7;
i = A * m + B * k;
if(i >= C)
break;
m++;
}
cout<<m<<endl;
return 0;
}

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

int main(){
    int ans=0,money=0;
    int a,b,c;
    cin >> a>>b>>c;

    while (money < c){
        ans++;
        if(ans%7==0){
            money += a+b;
        }else{
            money += a;
        }
    }
    //cout <<fixed<<setprecision(16)<< << endl;
    cout << ans << endl;

    //if(flag==1)cout << "Yes" <<endl;
    //else cout << "No" <<endl;
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c,o=0;
    cin>>a>>b>>c;
    for(;;){
        for(int i=0;i<7;i++){
            if(c<=0)break;
            c=c-a;
            o++;
        }
        if(c<=0)break;
        c=c-b;
    }
    cout<<o<<endl;
}

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

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

}