#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll s,t,n; cin >> s >> t >> n;
    vector<ll> a(n+1,0);
    for(int i=0;i<n;i++){
        cin >> a[i+1];
        a[i+1]+=a[i];
    }
    ll res=1e18;
    ll dif=s-t;
    for(int i=0;i<=n;i++){
        ll w=dif+a[i];
        if(w<=0){
            res=min(res,(ll)i);
        }
        else{
            if(a[n]>=0)continue;
            res=min(res,(ll)i+(w-a[n]-1)/(-a[n])*n);
        }
    }
    if(res>=1e18){
        printf("-1\n");
    }
    else{
        printf("%lld\n",res );
    }
}
