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 <iostream>
using namespace std;
int main() {
    int A, B, C;
    cin >> A >> B >> C;

    int goal = C;
    int d = 1;
    while (true) {
        goal -= A;
        if (goal <= 0) break;
        if (d % 7 == 0) goal -= B;
        if (goal <= 0) break;
        d++;
    }
    cout << d << endl;
    
    return 0;
}

C++: #include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#define MP(a, b) make_pair(a, b)
#define MMP(a, b, c) make_pair(make_pair(a, b), c)
#define MAX 1000000000
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define PI 3.14159265359


int main(){
    iostream::sync_with_stdio(false);
    
	int A,B,C;
	cin >> A >> B >> C;
	int tmp = 0;
	for(int i=1; i<INT_MAX; i++){
		tmp += A;
		if(i%7 == 0) tmp += B;
		if(tmp >= C){
			cout << i << endl;
			return 0;
		}
	}
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a, b, c; //a:１ログインでもらえるコイン数, b:７日間連続でログインしたらもらえるコイン数, c:欲しいコイン数
    cin >> a >> b >> c;
    int ans = 0; //回数カウンタ
    int d = 0; //枚数カウンタ
    while(d < c){
        ans++;
        d += a;
        if(ans%7 == 0){
            d += b;
        }
    }

    cout<<ans<<endl;

    return 0;
    }

C++: #include<cstdio>
using namespace std;
int main()
{
	int a,b,c,sum,cnt;
	scanf("%d %d %d",&a,&b,&c);
	sum=0;
	cnt=0;
	while(1){
		cnt++;
		sum+=a;
		if(cnt%7==0)	sum+=b;
		if(sum>=c)	break;
	}
	printf("%d\n",cnt);
	return 0;
}

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

int main(){
	int a,b,c,goukei,hi;
	hi=1;
	cin >> a>>b>>c;
	while(goukei<c){
	    if(hi%7!=0){
	    goukei += a;
	    hi++;
	    }
	    else{
	       goukei =goukei+a+b;
	       hi++;
	    }
	        
	    }
	    cout<<hi-1<<endl;
	    
	   
}

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>
#include<queue>
#include<stack>
#include<array>
#include<random>
#include<utility>
#include<cstdlib>
#include<ctime>
#define ll long long
#define rep(i,n) for(int i = 0; i < n; i++)
#define MOD 1000000007
using namespace std;

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

C++: #include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
        int a, b, c;
        int cnt = 0, coins = 0;
        cin >> a >> b >> c;
        while (true) {
                cnt++;
                if(coins >= c) {
                        cnt--;
                        break;
                }
                coins += a;
                if(cnt % 7 == 0) {
                        coins += b;
                }

        }
        cout << cnt << endl;
        return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    int i;  
    cin>>a;
    cin>>b;
    cin>>c;
    d=c/a;
    i=c%a;
    if(d<7){
        if(i<0){
           cout<<d<<endl;
        }else{
           cout<<d+1<<endl; 
        }
    }else{
        e=c/(a*7+b);
        f=c%(a*7+b);
        g=f/a;
        h=f%a;
        if(h<0){
            cout<<e*7+g<<endl;
        }else{
            cout<<e*7+g+1<<endl;
        }
    }
}

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

using int32 = int32_t;
using int64 = int64_t;
int main(void ){
  int64 A, B, C;
  cin >> A >> B >> C;
  int64 res = 0, cnt = 0;
  while (C > 0) {
    cnt++;
    if (cnt > 0 && cnt % 7 == 0) {
      C -= B;
    }
    C -= A;
    res++;
  }
  cout << res << endl;
}

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

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

C++: #include <iostream>
using namespace std;
int main(void){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    cin>>a;
    cin>>b;
    cin>>c;
    d=c/a;
    if(d<7){
        cout<<d<<endl;
    }else{
        e=c/(a*7+b);
        f=c%(a*7+b);
        g=f/a;
        h=f%a;
        if(h<0){
            cout<<e*7+g<<endl;
        }else{
            cout<<e*7+g<<endl;
        }
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int A,B,C;
    cin>>A>>B>>C;
    int s{};
    while(C>0){
        C=C-A;
        s++;
        if(s%7==0)C=C-B;
    }
    cout<<s<<endl;
}

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

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

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

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

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

int main(){ 
    int A, B, C;
    cin >> A >> B >> C;
    
    int ans = 0;
    while(C>0){
        for(int i=0;i<7;i++){
            C -= A;
            ans++;
            if(C <= 0) goto end;
        }
        C -= B;
    }
    end: cout << ans << endl;
    return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(void){
    int A,B,C,x,y,w;
    cin>>A>>B>>C;
    if(C<A*7){
     cout<<C/A+1<<endl;   
    }
    if(C>A*7){
        x=C/(7*A+B);
        y=C-x*(7*A+B);
        if(y%A==0){w=y/A;}else{w=y/A+1;}
        
        cout<<x*7+w<<endl;
    }
}

C++: #include<cstdio>


int main(){
    int a,b,c,t=0,d=0;
    scanf("%d %d %d",&a,&b,&c);
    while(t < c){
        d++;
        t += a;
        if(d % 7 == 0) t += b;
    }
    printf("%d\n",d);
}