Problem: Chokudai loves eating so much. However, his doctor Akensho told him that he was overweight, so he finally decided to lose his weight.

Chokudai made a slimming plan of a $D$-day cycle. It is represented by $D$ integers $w_0, ..., w_{D-1}$. His weight is $S$ on the 0-th day of the plan and he aims to reduce it to $T$ ($S > T$). If his weight on the $i$-th day of the plan is $x$, it will be $x + w_{i\%D}$ on the $(i+1)$-th day. Note that $i\%D$ is the remainder obtained by dividing $i$ by $D$. If his weight successfully gets less than or equal to $T$, he will stop slimming immediately.

If his slimming plan takes too many days or even does not end forever, he should reconsider it.

Determine whether it ends or not, and report how many days it takes if it ends.



Input

The input consists of a single test case formatted as follows.


$S$ $T$ $D$
$w_0 ... w_{D-1}$


The first line consists of three integers $S$, $T$, $D$ ($1 \leq S, T, D \leq 100,000, S > T$). The second line consists of $D$ integers $w_0, ..., w_{D-1}$ ($-100,000 \leq w_i \leq 100,000$ for each $i$).

Output

If Chokudai's slimming plan ends on the $d$-th day, print $d$ in one line. If it never ends, print $-1$.

Examples

Input

65 60 3
-2 3 -4


Output

4


Input

65 60 3
-2 10 -3


Output

-1


Input

100000 1 1
-1


Output

99999


Input

60 59 1
-123


Output

1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(a,b) for(auto (a): (b))
#define all(v) (v).begin(),(v).end()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define svec(v) cout<<#v<<":";rep(kbrni,v.size())cout<<" "<<v[kbrni];cout<<endl
#define sset(s) cout<<#s<<":";each(kbrni,s)cout<<" "<<kbrni;cout<<endl
#define smap(m) cout<<#m<<":";each(kbrni,m)cout<<" {"<<kbrni.first<<":"<<kbrni.second<<"}";cout<<endl

using namespace std;

typedef pair<int,int>P;

const int MAX_N = 100005;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int s,t,d;
    cin >> s >> t >> d;
    vector<int> vec(d);
    rep(i,d){
        cin >> vec[i];
    }
    vector<ll> sm(d);
    sm[0] = vec[0];
    ll mn = min(0LL,sm[0]);
    rep(i,d-1){
        sm[i+1] = sm[i] + vec[i+1];
        mn = min(sm[i+1],mn);
    }
    if(sm[d-1] < 0){
        if(mn <= t-s){
            ll nw = s;
            rep(i,d){
                nw += vec[i];
                if(nw <= t){
                    cout << i+1 << endl;
                    break;
                }
            }
        }else{
            ll diff = -sm[d-1];
            mn = -mn;
            ll sy = (s-t-mn-1)/diff + 1;
            ll nw = s-sy*diff;
            rep(i,d){
                nw += vec[i];
                if(nw <= t){
                    cout << sy*d + i+1 << endl;
                    break;
                }
            }
        }
    }else{
        if(mn <= t-s){
            ll nw = s;
            rep(i,d){
                nw += vec[i];
                if(nw <= t){
                    cout << i+1 << endl;
                    break;
                }
            }
        }else{
            cout << "-1\n";
        }
    }
    return 0;
}