cpp
#include<iostream>
using namespace std;
long long int a,b,n;
int main(){
cin>>a>>b>>n;
long long int res = 0;
res += (n/(a*5+b*2)==0)?0:(n/(a*5+b*2))*7;
n %= a*5+b*2;
while(n>0){
if(res % 7 <5) n -= a;
else n -= b;
res++;
}
cout<<res<<endl;
}