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>
using namespace std;
int main(void){
    int a,b,c,i,k;
    cin>>a>>b>>c;
    i=0;
    k=0;
        while(1){
            if(i>=c){break;}
        i=i+a;
        k=k+1;
        if(k%7==0){i=i+b;}
    }
    cout<<k<<endl;
    return 0;
}

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

int main() {
    int a, b, c, ans=0;
	cin >> a >> b >> c;
	while(a*ans+b*(ans/7)<c){
		ans++;
	}
	cout << ans << endl;
    return 0;
}

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

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

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

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

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

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

int main()
{
    int a,b,c; cin >> a >> b >>c;
    int per_week = 7*a + b;
    int week = c/per_week;
    int remain = c - week*per_week;
    
    int ans= 0;
    
    ans = (remain + a -1 )/a;
    if(ans >7) ans=7;
    ans += 7*week;
    
    

    cout << ans << endl;
    


    return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main(void)
{
	int a,b,c,i,cnt;
	cnt=0;
	cin>>a>>b>>c;
	while(1){
		if(c<=0) break;
		c=c-a;
		cnt=cnt+1;
		if(cnt%7==0) c=c-b;
	}
	cout<<cnt<<endl;
	return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
int main() {
	long long A, B, C;
	cin >> A >> B >> C;
	long long ans = 0, num = 0;
	while (num < C) {
		ans++;
		num += A;
		if (ans % 7 == 0) num += B;
	}
	cout << ans << endl;
}

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

int main(){
	int a,b,c;cin>>a>>b>>c;
int x=7*a+b,cnt=0;
cnt+=c/x*7;int y=c%x;if(y>0)cnt+=min((y-1+a)/a,7);
cout<<cnt<<endl;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<utility>
#include<deque>
#include<iomanip>
using namespace std;


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

	cin >> A >> B >> C;

	int week = C / (A * 7 + B);

	C -= (A * 7 + B) * week;

	int day = (C / A >= 7) ? 7 : (C % A == 0) ? C / A : C / A + 1;

	cout << week * 7 + day << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;




int main(){

	int A,B,C;

	scanf("%d %d %d",&A,&B,&C);

	int ans = C,left = 0,right= C,mid = (left+right)/2;

	while(left <= right){

		if(mid*A+mid/7*B >= C){

			ans = mid;
			right = mid-1;

		}else{

			left = mid+1;
		}
		mid = (left+right)/2;
	}

	printf("%d\n",ans);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
    int a,b,c,sum=0,n;
    cin >> a >> b >>c;
    for(int i=0; ; i++){
        sum=i*a+i/7*b;
        if(c<=sum){
            cout << i << endl;
            break;
        }
    }
}

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

int main() {
    int a,b,c; cin >> a >> b >> c;
    int count=0;
    count+=c/(a*7+b)*7;
    c%=(a*7+b);
    if(c/a>=7){
        count += 7;
    }
    else if(c%a!=0){
        count += (c/a+1);
    }
    else count += (c/a);
    cout << count << endl;    
    

    return 0;
}

C++: #include <iostream>

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

  int ans = 0;
  while (true) {
    if (c <= 0) {
      break;
    }
    c -= a;
    ans += 1;
    if (ans % 7 == 0) {
      c -= b;
    }
  }

  std::cout << ans << std::endl;

  return (0);
}

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

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

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

    cout << days << endl;
}

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

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

	int d = 0, j = 0;
	while (j < c)
	{
		d++;
		j += a;
		if (d % 7 == 0)
			j += b;
	}
	cout << d << endl;

	return 0;
}

C++: #include <iostream>

int main(int argc, char const *argv[]) {
  int A, B, C,coin=0, day=0;
  std::cin >> A >> B >> C;
  while(coin < C){
    day = day + 1;
    coin = coin + A;
    // + - * / %
    if(day % 7 == 0){
      coin = coin + B;
    }
  }
  std::cout << day << '\n';
}

C++: #include <iostream>
using namespace std;
int main(void){
    int daily, weekly, goal;
    int coins = 0;
    int N = 0;
    
    cin >> daily;
    cin >> weekly;
    cin >> goal;
    
    while(coins < goal){
        for(int i=0; i<7; i++){
            coins += daily;
            N++;
            
            if(coins>=goal){
                cout << N << "\n";
                return 0;
            }
        }
        
        coins += weekly;
        //N++;

        if(coins>=goal){
            cout << N << "\n";
            return 0;
        }        
    }
return 0;    
}

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

int main() {
  int A, B, C, P, N, Ans;
  cin >> A >> B >> C;
  P = 0;
  Ans = 0;
  N = 1000000;
  
  for (int i = 0; i < N; i++) {
    Ans++;
    P += A;
    if (Ans % 7 == 0) {
      P += B;
    }
    if (P >= C) {
      break;
    }
  }
  
  cout << Ans << endl;
  
  return 0;
}

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

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

  int ans = 0;
  while (true) {
    if (7 * a >= c) {
      ans += ceil((double)c / a);
      break;
    } else if (7 * a + b >= c) {
      ans += 7;
      break;
    } else {
      ans += 7;
      c -= 7 * a + b;
    }
  }

  cout << ans << endl;
}

C++: #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
const long long INFLL = 1LL << 60;
const int INFINT = 1 << 30;
const long long MOD = 1e9 + 7;

template <class T> void vecout(T V) {
    auto t = V.begin();
    while(t != V.end()) {
        cout << *t++;
        if(t != V.end()) cout << " ";
    }
    cout << endl;
};

int main() {
    int A, B, C, d = 0;
    cin >> A >> B >> C;
    int w = A * 7 + B;
    if(C >= w) {
        d = 7 * (C / w);
        C %= w;
    }
    d += (C > A * 7) ? 7 : ceil(C * 1.0 / A);

    cout << d << endl;
}