Go: package main

import "fmt"
	
func main()  {
	// ログインするたびに A 枚のコインが得られる
	// 7 日連続でログインすると，そのたびに，追加で B 枚
	// 少なくとも C 枚のコインを得るためにログインしなければならない回数
	var a, b , c int
	_, _ = fmt.Scan(&a, &b, &c)
	fmt.Printf("%d\n",calc(a, b, c))
}

func calc(a int, b int, c int) int{
	var day int
	for c > 0 {
		day++
		c -= a
		if day % 7 == 0 {
			c -= b
		}
	}
	return day
}

C++: #define _USE_MATH_DEFINES //円周率を使用
#include <math.h>
#include <iomanip> //小数点以下を表示
#include <iostream>
#include <cstring> //文字列操作
using namespace std;

//【関数の定義】

int main(void)
{
	int a; //ログイン（1日1回のみ）の枚数
	int b; //月曜日から日曜日まで7日連続でログインの追加枚数
	int c; //c枚のコインを得るためにログインしなければならない日の最小値、のc枚
	int total = 0; //合計枚数
	int day = 0; //日
	int i, j, k; //カウンタ変数

	cin >> a >> b >> c; //A,B,Cを入力
	if (a < 1 || a > 1000 || b < 0 || b > 1000 || c < 1 || c > 1000000)
	{
		return 0;
	}

	while (1)
	{
		day++;
		total += a; //ログインボーナス
		
		if (day % 7 == 0)
		{
			total += b; //1週間連続ログインボーナス
		}

		if (total >= c) //c枚のコインを得るためにログインしなければならない日の最小値を達成した場合
		{
			cout << day << endl;
			return 0;
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define MAX_N 100000
#define MAX_M 100000
const int INF = 1e9;

int main() {
  int A,B,C,i;
  cin>>A>>B>>C;
  for(i=0;i*A+(i/7)*B<C;i++){
  }
  cout<<i<<endl;
}

C++: #include<iostream>

int main(){
    int a,b,c;
    std::cin>>a>>b>>c;
    int sum=0;
    int cnt=1;
    while(1){
        if(sum>=c)break;
        else{
            if(cnt%7==0){
            sum=sum+a+b;
            
            //std::cout<<"sum="<<sum<<" cnt="<<cnt<<"\n";
            cnt++;
        }
        else{
            sum+=a;
           // std::cout<<"sum="<<sum<<" cnt="<<cnt<<"\n";
            cnt++;
        }

        }
        
    }
    std::cout<<cnt-1<<"\n";
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
   cin.tie(0);
   ios::sync_with_stdio(false);
   int a,b,c;
   cin>>a>>b>>c;
   int x=c/(7*a+b);
   int y=c%(7*a+b);
   int t=7;
   for(int i=0;i<=7;i++){
       if(i*a>=y){
           t=i;
           break;
       }
   }
   cout<<t+7*x<<endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a, b, c;
    cin >> a >> b >> c;
    
    int result = 0;
    
    if( c / ( a * 7 ) <= 0 ){
        if( c % a == 0 ){
            result = c / a;
        }else{
            result = c / a + 1;
        }
    }else{
        result += 7;
        c = c - ( a * 7 + b );
        int i = 1;
        while( c > 0 ){
            
            c -= a;
            if( i % 7 == 0 ){
                c -= b;
            }
            
            result++;
            i++;
        }
    }
    
    cout << result << endl;
    
}

C++: #include<bits/stdc++.h>
using namespace std;
//define
#define int unsigned long long
#define vint vector<int>
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define Rep(x,y) for(int k=x;k<y;k++)
#define all(x) x.begin(),x.end()
#define pb() push_back()
#define mod 100000007
#define elif else if
#define str string

//dp
template<class T>inline bool chmin(T& a,T b){
  if(a>b){
    a=b;
    return true;
  }
  return false;
}
template<class T>inline bool chmax(T& a,T b){
  if(a<b){
    a=b;
    return true;
  }
  return false;
}
const long long INF=1LL<<60;
long long dp[100010];

//main
signed main(){
  int N,M,O,Q,count=0,count2=0,count3=0;
  for(int i=0;i<100010;i++)dp[i]=INF;
  dp[0]=0;
  double D=0;
  int c='A'-'a';
  char C;
  str S,T;
  cin>>N>>M>>O;
  while(1){
    count+=N;
    count2++;
    if(count2%7==0)count+=M;
    if(count>=O)break;
  }
  cout<<count2<<endl;
}

C++: #include <iostream>

int main(void){
    int coinPerDay, coinBonus, coinNeeded;
    int day = 0;
    int nowMyCoin = 0;
    
    std::cin >> coinPerDay >> coinBonus >> coinNeeded;
    
    while(nowMyCoin < coinNeeded){
        nowMyCoin += coinPerDay;
        //if the day is 7th from start
        if((++day % 7) == 0){
            nowMyCoin += coinBonus;
        }
    }
    
    std::cout << day << std::endl;
}

C++: #include<iostream>
using namespace std;
int main(){
  int A,B,C;
  int sum=0;
  int count=0;
  cin >> A >> B >> C;
  if(C<=A){
    cout << 1 << endl;
  }else{
      while(C>0){
        count++;
        if(count%7!=0){
          //sum+=A;
          C=C-A;
        }else{
          //sum+=B+A;
          C=C-(A+B);
        }
      }
      cout << count << endl;
  }
}

C++: #include <iostream>
using namespace std;
int main(void){
    int A,B,C,coin,day;;
    coin=0;
    day=0;
    cin>>A>>B>>C;
    while(1){
       if(coin>=C){
           break;
       } 
       coin=A+coin;
       day=day+1;
       if(day%7==0){
           coin=coin+B;
       }
    }
    cout<<day<<endl;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
    int A, B, C, week, amari,i , day = 0;
    cin >> A >> B >> C;
    week = C/(7*A + B);
    amari = C%(7*A + B);
    for(i=0;i<7;i++){
        if(amari<=A*i){
            break;
        }
    }
    day = week*7 + i;
    cout << day << endl;
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,c;
    cin >> a >> b >> c;
    int score = 0;
    for(int day = 1; ; day++){
        score += a;
        if(day % 7 == 0){
            score += b;
        }
        if(score >= c){
        cout << day << endl;
        break;
        }
    }
}

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

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    int ans;
    ans = c / (7 * a + b);
    int sa = c % (7 * a + b);
    vector<int> s = {a,a,a,a,a,a,a+b};
    int cnt = 0;
    while (sa > 0){
        sa -= s[cnt];
        cnt++;
    }
    ans = ans * 7 + cnt;
    cout << ans << endl;
}

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

int main(){
  int a,b,c,d,e,f,g;
  scanf("%d%d%d",&a,&b,&c);
  d = c / (a*7+b);
  e = c % (a*7+b);
  f = e / a;
  g = e % a;
  if(g == 0){
    printf("%d\n",min(7*d+f,7*(d+1)));
  }
  else{
    printf("%d\n",min(7*d+f+1,7*(d+1)));
  }
}

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
#include<sstream>
#include<iterator>
#include<list>

using namespace std;

typedef  long long int lint;

#define rep(i, n) for (lint i = 0; i < n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
#define mp make_pair
#define enld endl

int main() {
	lint A, B, C;
	cin >> A >> B >> C;
	lint now = 0;
	lint cnt = 0;
	while (1) {
		now += A;
		if (cnt % 7 == 6) {
			now += B;
		}
		if (now >= C) {
			cout << cnt+1 << endl;
			break;
		}
		cnt++;
	}
}