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 <bits/stdc++.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i<(n); i++)
using namespace std;
typedef long long ll;
//pi = 3.14159265358979323846

int main() {

    int i, a, b, c, now;
    cin >> a >> b >> c;
    now = 0;
    for(i = 0; now < c; i++){
        now += a;
        if(i % 7 == 6)now += b;
    }
    cout << i << endl;

}

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

int main(){
    ll a, b, c;
    cin >> a >> b >> c;
    ll numw = c / (7 * a + b);
    c -= numw * (7 * a + b);
    ll numd = min(7LL, (c + a - 1) / a);
    cout << 7 * numw + numd << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#define rep(i, n) for(int i = 0; (i) < (n); (i)++)

using namespace std;

int main() {
    int a,b,c;
    cin >> a >> b >> c;
    int t=0,cnt=0,ans=0;
    while(t < c) {
        t += a;
        cnt++;
        if(cnt == 7) {
            cnt = 0;
            t += b;
        }
        ans++;
    }
    cout << ans << endl;
}

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

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++: #include<stdio.h>
int main(void)
{
	int a,b,c,x,y;
	scanf("%d %d %d",&a,&b,&c);
	x=0;	y=0;	
	while(1){
		if(x>=c) break;
		x+=a;
		y++;
		if(y%7==0)  x+=b;
	}
	printf("%d\n",y);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

int main() {
    int i;
    int a, b, c;
    int n = 0;
    std::cin >> a >> b >> c;
    for (i = 1; n < c; i++) {
        n += a;
        if (i % 7 == 0) {
            n+=b;
        }
    }
    std::cout << i-1 << std::endl;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c;cin>>a>>b>>c;
    int ans = 0;
    int ret = 1;
    while(true){
      if(ret%7==0)ans+=b;
      ans+=a;
      if(ans >= c){
        cout << ret << endl;
        return 0;
      }
      ret++;
    }
}

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

int main(void){
    int a,b,c;
    cin>>a>>b>>c;
    int n=c/(a*7+b);
    int rem=c-n*(a*7+b);
    cout<<n*7+(rem+(a-rem%a))/a<<endl;
    return 0;
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,coin=0,day=1;
  cin>>a>>b>>c;
  while(coin<c){
    coin+=a;
    if(day%7==0) coin+=b;
    ++day;
  }
  cout<<day-1<<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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
int main()
{
    int a,b,c;
    cin >> a >> b >>c;
    int r = c / (7*a + b);
    int d = c % (7*a + b);
    if (d == 0) cout << r * 7 << endl;
    else{
        if (d <= 6 * a)  cout << (r * 7) + (d + a - 1) / a << endl;
        else cout << (r+1) * 7 << endl;
    }

    return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,d=0,e=0,f=0;
  cin>>a>>b>>c;
  while(true){
    f++;
    d++;
    if(d==7){
      e=e+b;
      d=0;
    }
    e=e+a;
    if(e>=c){
      cout<<f<<"\n";
      break;
    }
  }
}

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

int main(void){
    int A,B,C;
    cin>>A>>B>>C;
    int coin_per_week=7*A+B;
    int day=0;

    day=(C/coin_per_week)*7;
    int rest=C%coin_per_week;
    if(rest==0){;}
    else if(rest<=A){day+=1;}
    else if(rest<=2*A){day+=2;}
    else if(rest<=3*A){day+=3;}
    else if(rest<=4*A){day+=4;}
    else if(rest<=5*A){day+=5;}
    else if(rest<=6*A){day+=6;}
    else{day+=7;}
    cout<<day<<endl;
    return 0;
}

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

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

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

#define int long long
#define endl "\n"
#define REP(i,a,n) for(int i=a;i<n;++i)
#define REPR(i,a,n) for(int i=a;i>n;--i)
#define RUP(a,b) ((a+b-1)/(b))
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define MOD 1000000007
#define INF LLONG_MAX/2

typedef long long ll;
typedef pair<int,int> Pii;
typedef tuple<int,int,int> Tiii;
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef vector<Pii> VPii;
typedef vector<string> Vs;

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;}
template<class T> void YesNo(T a) {cout<<(a?"Yes":"No")<<endl;}
template<class T> void YESNO(T a) {cout<<(a?"YES":"NO")<<endl;}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
void uniq(Vi &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end());}
bool comp(Pii a,Pii b){
    if(a.second != b.second) return a.second<b.second;
    else return a.first<b.first;
}

signed main(){cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
    int a,b,c;
    cin>>a>>b>>c;

    int now=0,ans=0;
    while(now<c){
        now+=a;
        if(ans%7==6) now+=b;
        ans++;
    }
    cout<<ans<<endl;
    return 0;
}

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

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

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

int main(){
	long int da, we, ta;
	long int ans;
	cin>>da>>we>>ta;

	long int to_we;
	to_we=da*7+we;
	
	long int ex_we;
	long int re_we;
	ex_we=ta/to_we;
	re_we=ta%to_we;
	
	if(ex_we*to_we>ta)
	{
		ans=ex_we*7;
	}
	else
	{
		long int ad_da;
		ad_da=re_we/da;
		if(ad_da>=7)
			ans=ex_we*7+7;
		else
		{
			ans=ex_we*7+ad_da;
			if(ex_we*to_we+da*ad_da<ta)
				ans++;
		}
	}
	cout<<ans<<endl;
	
	return 0;
}