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

namespace ConsoleApp19
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string[] s = str.Split(' ');
            decimal p = decimal.Parse(s[0]);
            decimal q = decimal.Parse(s[1]);
            decimal r = decimal.Parse(s[2]);
            decimal l = decimal.Parse(s[3]);
            decimal t = decimal.Parse(s[4]);
            int b = 0;
            for (decimal i = l; i <= t; i++)
            {
                if ((Math.Ceiling(i / p) + Math.Ceiling(i / q) + Math.Ceiling(i / r)) <= i) b++;
            }
            Console.WriteLine(b);

            

        }
    }
}