//加油!
#include<cstdio>
#include<iostream>
#include<cstring>
#include<string.h>
#include<algorithm>
using namespace std;
const int maxn = 10000 + 5;
struct node
{
int n;
double p;
}res[maxn];
double dp[maxn];
int main()
{
int n, m;
while(scanf("%d%d", &n, &m) == 2)
{
if(n==0 && m==0)return 0;
memset(res,0,sizeof(res));
memset(dp,0,sizeof(dp));
for(int i = 0; i < m; ++i) scanf("%d%lf", &res[i].n, &res[i].p);
for(int i = 0; i <= n; ++i) dp[i] = 1;
for(int i = 0; i < m; ++i)
for(int j = n; j >= res[i].n; --j) dp[j] = min(dp[j], dp[j-res[i].n] * (1-res[i].p));
printf("%.1lf%%\n", (1-dp[n]) * 100);
}
return 0;
}