Problem: Petya once wrote a sad love song and shared it to Vasya. The song is a string consisting of lowercase English letters. Vasya made up q questions about this song. Each question is about a subsegment of the song starting from the l-th letter to the r-th letter. Vasya considers a substring made up from characters on this segment and repeats each letter in the subsegment k times, where k is the index of the corresponding letter in the alphabet. For example, if the question is about the substring "abbcb", then Vasya repeats letter 'a' once, each of the letters 'b' twice, letter 'c" three times, so that the resulting string is "abbbbcccbb", its length is 10. Vasya is interested about the length of the resulting string.

Help Petya find the length of each string obtained by Vasya.

Input

The first line contains two integers n and q (1≤ n≤ 100 000, 1≤ q ≤ 100 000) — the length of the song and the number of questions. 

The second line contains one string s — the song, consisting of n lowercase letters of English letters.

Vasya's questions are contained in the next q lines. Each line contains two integers l and r (1 ≤ l ≤ r ≤ n) — the bounds of the question.

Output

Print q lines: for each question print the length of the string obtained by Vasya.

Examples

Input


7 3
abacaba
1 3
2 5
1 7


Output


4
7
11


Input


7 4
abbabaa
1 3
5 7
6 6
2 4


Output


5
4
1
5


Input


13 7
sonoshikumiwo
1 5
2 10
7 7
1 13
4 8
2 5
3 9


Output


82
125
9
191
62
63
97

Note

In the first example Vasya is interested in three questions. In the first question Vasya considers the substring "aba", that transforms to "abba", so the answer is equal to 4. In the second question Vasya considers "baca", that transforms to "bbaccca", so the answer is 7. In the third question Vasya considers the string "abacaba",that transforms to "abbacccabba" of length 11.

Solution (in CPP):

Solution:
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~
--||author : codechaser||-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <bits/stdc++.h>
using namespace std;
//OPTIMIZATION
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#define rep2(i,k,n,a) for(llint i=k;(i<n)&&(a);i++)
#define rep3(i,k,n,a) for(llint i=k;(i>n)&&(a);i--)
#define rep0(i,k,n) rep2(i,k,n,1)
#define rep1(i,k,n) rep3(i,k,n,1)
#define br cout<<"\n";
#define yea cout<<"YES\n"
#define nah cout<<"NO\n"
#define print0(x) for(auto i:x) cout<<i<<" "; br;
#define print1(x) for(auto i:x) cout<<i.first<<" "<<i.second<<"\n"; br;
#define input0(x) for(auto &i:x) cin>>i;
#define input1(x) for(auto &i:x) cin>>i.first>>i.second;
#define input2(x,n) rep0(i,0,n) llint inp,cin>>inp,x.insert(inp);
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define ifn(x) if(!(x))
#define setbits(x) __builtin_popcountll(x)
#define tzerobits(x) __builtin_ctzll(x)
#define lzerobits(x) __builtin_clzll(x)
#define gcd __gcd
#define lcm(x,y) (x*y/gcd(x,y))
#define fileinput freopen("input.txt","r",stdin);
#define fileoutput freopen("output.txt","w",stdout);
#define clock1 tttt=clock();
#define clock0 cout<<"\ntime taken: "<<(((double)clock())-tttt)/((double)CLOCKS_PER_SEC) <<"\n\n";
//#define a(i,j,n) a[i][j]
//#define a(i,j,n) a[i*n+j]
typedef long long llint;
typedef unsigned long long ull;
typedef long double ld;
typedef unsigned int uint;
typedef vector<llint> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;
typedef pair<llint,llint> pll;
typedef pair<llint,string> pls;
typedef map<llint,llint> mll;
const uint uintMax=4294967295;         //+(1<<32) - 1
const int intMax=2147483647;           //+(1<<31) - 1
const int intMin=-2147483648;          //-(1<<31)
const ull ullMax=18446744073709551615; //+(1<<64) - 1
const llint Max=9223372036854775807;   //+(1<<63) - 1
const llint Min=-9223372036854775808;  //-(1<<63)
////////////////////////////////////////////////////////////////////////////////////////////////////////////
llint power(llint n, llint exp);
void ts(vector<llint>& v, llint od);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
inline void codechaser(){
    llint n,q,ans=0;
    string s;
    cin>>n>>q>>s;
    vl v;
    rep0(i,0,n) ans+=(s[i]-'a'+1),v.pb(ans);
    while(q--){
        llint l,r;
        cin>>l>>r;
        cout<<v[r-1]-(((l-2)>=0)?(v[l-2]):0)<<"\n";
    }
    return;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    llint t=1;
    //cin>>t;
    while(t--) codechaser();
    return 0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
llint power(llint n, llint exp){
    llint res=1;
    while(exp){
        if(exp&1) res*=n,exp--;
        else n*=n,exp>>=1;
    }
    return res;
}
void ts(vector<llint>& v, llint od){
    if(!v.size()) return;
    llint n=v.size(),max=abs(v[0]);
    rep0(i,1,n) if(abs(v[i])>max) max=abs(v[i]);
    llint k=log10(max)+1;
    rep0(i,0,ceil((double)k/od)){
        vector<vector<llint>> record(power(10,od));
        rep0(j,0,n) (record[(llint)abs((llint)((v[j])%((llint)power(10,od*(i+1))))/power(10,od*i))]).pb(v[j]);
        llint counter=0;
        rep0(j,0,power(10,od)) for(auto k:record[j]) v[counter]=k,counter++;
    }
    return;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
    |---------------------------------------------------|
    |||   https://codeforces.com/profile/codechaser   |||
    |||   https://www.codechef.com/users/codechaser   |||
    |---------------------------------------------------|
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////