Problem: It turns out that you are a great fan of rock band AC/PE. Peter learned that and started the following game: he plays the first song of the list of n songs of the group, and you have to find out the name of the song. After you tell the song name, Peter immediately plays the following song in order, and so on.

The i-th song of AC/PE has its recognizability pi. This means that if the song has not yet been recognized by you, you listen to it for exactly one more second and with probability of pi percent you recognize it and tell it's name. Otherwise you continue listening it. Note that you can only try to guess it only when it is integer number of seconds after the moment the song starts playing.

In all AC/PE songs the first words of chorus are the same as the title, so when you've heard the first ti seconds of i-th song and its chorus starts, you immediately guess its name for sure.

For example, in the song Highway To Red the chorus sounds pretty late, but the song has high recognizability. In the song Back In Blue, on the other hand, the words from the title sound close to the beginning of the song, but it's hard to name it before hearing those words. You can name both of these songs during a few more first seconds.

Determine the expected number songs of you will recognize if the game lasts for exactly T seconds (i. e. you can make the last guess on the second T, after that the game stops).

If all songs are recognized faster than in T seconds, the game stops after the last song is recognized.

Input

The first line of the input contains numbers n and T (1 ≤ n ≤ 5000, 1 ≤ T ≤ 5000), separated by a space. Next n lines contain pairs of numbers pi and ti (0 ≤ pi ≤ 100, 1 ≤ ti ≤ T). The songs are given in the same order as in Petya's list.

Output

Output a single number — the expected number of the number of songs you will recognize in T seconds. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6.

Examples

Input

2 2
50 2
10 1


Output

1.500000000


Input

2 2
0 2
100 2


Output

1.000000000


Input

3 3
50 3
50 2
25 2


Output

1.687500000


Input

2 2
0 2
0 2


Output

1.000000000

Solution (in JAVA):

Solution:
import java.util.*;
/*

 */
import java.io.*;
public class d 
{
	public static void main(String[] arg)
	{
		new d();
	}
	int n, T;
	double[] p;
	int[] t;
	double[][] memo;
	boolean[][] used;
	double[][] hm;
	public d()
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		n = in.nextInt();
		T = in.nextInt();
		hm = new double[n][2];
		p = new double[n];
		t = new int[n];
		used = new boolean[n+1][T+1];
		memo = new double[2][T+1];
		
		for(double[] a : memo) Arrays.fill(a, -1);
		for(int i = 0; i < n; i++)
		{
			p[i] = in.nextInt()/100.0;
			t[i] = in.nextInt();
		}
		
		for(int i = 0; i < n; i++)
		{
			hm[i][0] = pow(1-p[i], t[i]-1);
			hm[i][1] = pow(1-p[i], t[i]-2);
		}
		
		for(int i = n; i >= 0; i--)
		{
			for(int j = T; j >= 0; j--)
			{
				memo[i&1][j] = solve(i, j);
			}
		}
		out.println(memo[0][0]);
		in.close(); out.close();
	}
	double solve(int index, int time)
	{
		if(time == T) return index;
		if(time > T) return 0;
		if(index == n) return index;
		if(used[index][time]) return memo[index&1][time];
		double ret = 0;
		ret = memo[index&1][time+1];
		
		if(time+t[index] > T)
		{
			if(time == T-1)
			{
				ret = p[index]*memo[(index+1)&1][time+1];
				ret += (1-p[index])*memo[index&1][time+1];
			}
			else
			{
				ret *= 1-p[index];
				ret += p[index]*memo[(index+1)&1][time+1];
			}
		}
		else if(time+t[index] == T)
		{
			if(t[index] == 1)
			{
				ret = memo[(index+1)&1][time+1];
			}
			else
			{
				ret -= hm[index][0]*memo[index&1][T];
				//ret -= pow(1-p[index], t[index]-1)*memo[index&1][T];
				//ret -= pow(1-p[index], t[index]-2)*p[index]*memo[(index+1)&1][T];
				ret -= hm[index][1]*p[index]*memo[(index+1)&1][T];
				ret *= 1-p[index];
				ret += p[index]*memo[(index+1)&1][time+1];
				//ret += pow(1-p[index], t[index]-1)*memo[(index+1)&1][T];
				ret += hm[index][0]*memo[(index+1)&1][T];
			}
		}
		else
		{
			if(t[index] == 1)
			{
				ret = memo[(index+1)&1][time+1];
			}
			else
			{
				ret -= hm[index][0]*memo[(index+1)&1][time+1+t[index]];
				//ret -= pow(1-p[index], t[index]-1)*memo[(index+1)&1][time+1+t[index]];
				//ret -= pow(1-p[index], t[index]-2)*p[index]*memo[(index+1)&1][time+t[index]];
				ret -= hm[index][1]*p[index]*memo[(index+1)&1][time+t[index]];
				ret *= 1-p[index];
				ret += p[index]*memo[(index+1)&1][time+1];
				//ret += pow(1-p[index], t[index]-1)*memo[(index+1)&1][time+t[index]];
				ret += hm[index][0]*memo[(index+1)&1][time+t[index]];
			}
		}
		used[index][time] = true;
		return memo[index&1][time] = ret;
	}
	
	double pow(double base, int exp)
	{
		if(exp == 0) return 1;
		if(exp%2 == 1)
		{
			return base*pow(base, exp-1);
		}
		else
		{
			double ret = pow(base, exp/2);
			return ret*ret;
		}
	}
	class FastScanner 
	{
		final BufferedReader reader;
		String line;
		int index;
		public FastScanner(InputStream in)
		{
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public FastScanner(File f) throws FileNotFoundException
		{
			reader = new BufferedReader(new FileReader(f));
		}
		public String readLine()
		{
			try
			{
				String line = reader.readLine();
				if(line == null) throw new IOException("End of stream");
				return line;
			}
			catch(IOException exception)
			{
				throw new RuntimeException(exception);
			}
		}
		public String nextLine()
		{
			if(line==null) return readLine();
			String s = line;
			line = null;
			return s.substring(index);
		}
		public String next()
		{
			if(line == null)
			{
				line = readLine();
				index = 0;
			}
			while(index >= line.length())
			{
				line = readLine();
				index = 0;
			}
			while(Character.isWhitespace(line.charAt(index)))
			{
				index++;
				while(index >= line.length())
				{
					line = readLine();
					index = 0;
				}
			}
			int endIndex = index;
			while(endIndex < line.length() && !Character.isWhitespace(line.charAt(endIndex)))
				endIndex++;
			String s = line.substring(index, endIndex);
			index = endIndex;
			return s;
		}
		public int nextInt() { return Integer.parseInt(next()); }
		public long nextLong() { return Long.parseLong(next()); }
		public double nextDouble() { return Double.parseDouble(next()); }
		public void close() {;}
	}
}