using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LUBENICE
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int p = int.Parse(s[0]);
            int q = int.Parse(s[1]);
            int r = int.Parse(s[2]);
            long a = long.Parse(s[3]);
            long b = long.Parse(s[4]);
            long x = 0;
            if ((p * q + p * r + q * r) / (double)(p * q * r) > 1) Console.WriteLine(0);
            else if ((p * q + p * r + q * r) / (double)(p * q * r) == 1) Console.WriteLine(Math.Max(Math.Max(p, q), r));
            else if (b > 100 && a < 100)
            {
                for (long i = a; i <= 100; i++)
                {
                    if (Math.Ceiling(i / (double)p) + Math.Ceiling(i / (double)q) + Math.Ceiling(i / (double)r) <= i) x++;
                }
                x += b - 100;
                Console.WriteLine(x);
            }
            else
            {
                x = b - 100;
                Console.WriteLine(x);
            }
        }
    }
}