#include <iostream>
#include <cstdlib>

using namespace std;

const int mod=100000;
int main(){
    int n,m,st[100000],mv,t;
    cin>>n>>m;
    int acc=0,sum=0,pos=0;
    st[0]=acc;
    for(int i=1;i<n;++i){
        cin>>t;
        acc +=t;
        st[i]=acc;
    }
    for(int i=0;i<m;++i){
        cin>>mv;
        sum =sum+abs(st[mv+pos]-st[pos]);
        pos +=mv;
        if(i%200==0) sum %=mod;
    }
    cout<<sum%mod<<endl;
    return 0;
}