public static void main(String[] args) throws IOException
	{
		br = new BufferedReader(new InputStreamReader(System.in));
		sn = new Scanner(System.in);
		String z;
		
		while((z = br.readLine()) != null)
		{
			a.clear();
			String[] c = z.split("\\s");
			int n = Integer.parseInt(c[0]);
			int m = Integer.parseInt(c[1]);
						
			if(n == 0 && m == 0)
				break;
			else
			{
				for(int i = n; i <= m; i++)
				{
					addToArrayList(String.valueOf(i));
				}
			
				System.out.println(sumArray(a));
			}
		}
	}