Go: package main

import (
	"fmt"
)

func calcDay(daily, bonus, req int) int {
	fullWcoin   := 7 * daily + bonus	//"週給"
	sixDaycoin := 6 * daily				//6日目まででもらえるコイン

	week := req / fullWcoin //必要満週数
	day := 0
	rem  := req % fullWcoin
		
		if sixDaycoin < rem && rem < fullWcoin {
			week++
		} else {
			day = rem / daily
				if rem % daily > 0 {
					day++
				}
		}

	return 7 * week + day
}

func main() {
	var daily, bonus, req int
		fmt.Scanf("%d %d %d",&daily ,&bonus ,&req)
		fmt.Printf("%d\n",calcDay(daily, bonus, req))
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#include <iomanip>
#include <numeric>
#include <unordered_map>
#include <sstream>   
#include<limits.h>
#include<float.h>
#include<list>
#include <array>
#include <complex>
using namespace std;
#define i64  long long
#define int  long long
 
#define I32_MAX 2147483647
#define I64_MAX 9223372036854775807LL
#define I64_MAX2 1223372036854775807LL
#define INF I64_MAX2
#define MOD 1000000007
#define MEM_SIZE 10000

// int DP[MEM_SIZE][MEM_SIZE] = {0};
// int GMEM[MEM_SIZE][MEM_SIZE] = {0};
template<typename T> void DEBUG(T e){std::cout << e << std::endl;}
template<class T> void DEBUG(string str, T e){std::cout <<str << ">>" << e << std::endl;}
template<typename T> void DEBUG(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void DEBUG(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ DEBUG(v); } }
template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; exit(0);}}
template< typename T1, typename T2 > inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template< typename T1, typename T2 > inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

void solve(void)
{
  int A,B,C;
  cin>>A>>B>>C;
  int ANS = 0;
  int DAY = 0;
  while(true)
  {
    DAY++;
    ANS += A;
    if(DAY%7 == 0)
    {
      ANS += B;
    }
    if(ANS >= C)
    {
      break;
    }
    
  }
  cout<<DAY<<endl;
  return; 
}


int32_t main(int32_t argc, const char *argv[])
{
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);

  std::cout << std::fixed;
  std::cout << std::setprecision(9);
  solve();

 
  return 0;
}

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