#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++) 
typedef long long ll;

int main(){
  int t;
  cin >> t;
  ll N;
  cin >> N;
  ll count=0;
  ll ans=0;
  
  vector<int> A(100);
  for(int i=0;i<100;i++){
    A[i]=0;
  }
  
  

  for(ll i=0;i<100;i++){
    if(i*t/100!=(i+1)*t/100){
      A[count]=i;
      count++;
    } 
  }
  
  int last=0;
  
  for(int i=99;i>-1;i--){
    if(A[i]!=0){
      last=A[i];
      break;
    }
  }
    
  
  ll a=N/count;
  ll b=N%count;
  
  if(b==0){
    cout << ((a-1)*100+last)*(100+t)/100+1 << endl;
  }
    
  
  else{
 cout << (a*100+A[b-1])*(100+t)/100+1 << endl;
  }
  
 
  
  
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (ll i = 0; i < N; i++)

int main()
{
int m=1000000007;
ll n; cin >> n;
vector<ll> a(n);
rep(i,n) cin >>  a[i];
vector<vector<ll>> f(n+2,vector<ll>(2));
f[0][0]=0; f[0][1]=1;
rep(i,n){
    f[i+1][0]=f[i][1]%m;
    f[i+1][1]=(f[i][0]+f[i][1])%m;
}
ll ans=0;
rep(i,n){
    ans=(ans%m)+(a[i]%m)*(((f[i][1]*f[n-i][1])%m)-((f[i][0]*f[n-i][0])%m))%m;
}
ans%=m;
if (ans < 0) ans += m;
cout << ans%m << endl;
}



