#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long int ll;
const ll mod=1e5;
int main(){
    int n,m;
    cin>>n>>m;
    ll dp[100001]={0};
    for(int i=2;i<=n;i++){
        int latte;
        cin>>latte;
        dp[i]=latte+dp[i-1];
        dp[i];
    }
    int cafe=1;
    ll sum=0;
    for(int i=0;i<m;i++){
        int to;
        cin>>to;
        ll a=dp[cafe]-dp[cafe+to];
        if(a<0)a*=-1;
        sum+=a;
        cafe+=to;
    }
    sum%=mod;
    cout<<sum<<endl;
    return 0;
}