using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;

public static partial class MyExtension
{
    public class Solution
    {
        /* Head ends here */

        public const int PAD_FACTOR = 7;

        public static int greedy(int a, int b, int f, int k)
        {
            var ans = 0;
            var stock = b;
            var spbu = f;
            while (k-- > 0)
            {
                var canSpbu = stock >= spbu;
                if (!canSpbu)
                    return -1;
                // decide whether to refill or not
                var canStopNoRefill = stock >= a;
                var last = k == 0;
                var nextSpbu = a - spbu;
                var nextCanSpbuNoRefill = stock >= (a + nextSpbu);
                var skipRefill = new Func<bool>(() =>
                {
                    if (last) return canStopNoRefill;
                    return nextCanSpbuNoRefill;
                });
                // simul
                stock -= spbu;  // to spbu
                assert(stock >= 0);
                if (skipRefill() == false)
                {
                    // refill
                    stock = b;
                    ans++;
                }
                stock -= (a - spbu);    // to stop
                assert(stock >= 0);
                // next loop
                spbu = a - spbu;
            }
            return ans;
        }

        int solve()
        {
            // a, b, f, k (0 < f < a ≤ e6, 1 ≤ b ≤ e9, 1 ≤ k ≤ e4)
            var A = ReadInt32();//e6
            var B = ReadInt32();//e6
            var F = ReadInt32();//e9
            var K = ReadInt32();//e4
            // only refill if necessary -> can't finish k
            return greedy(A, B, F, K);
            // Print the minimum number of times the bus needs to refuel to make k journeys. If it is impossible for the bus to make k journeys, print -1.
        }

        public void zStart()
        {
            Console.WriteLine(solve());

            ///////////////////////////////////////

            //foreach (var @__ in Enumerable.Range(1, ReadInt32()))
            //{
                // start... - no CONSOLE

                // end...

                //var ansLines = new List<string>(9999);
                //{
                //    // ANS start...

                //    //ansLines.AddRange(inp.Select(x => new string(x)));
                //    //...

                //    Console.Write("Case #{0}: ", @__);
                //    Console.WriteLine(string.Join(" ", __getFormattedString(ans)));
                //    ansLines.ForEach(x => Console.WriteLine(x));
                //}
                //Trace.WriteLine(string.Format("DONE_{0}.", @__));
            //}
        }

        T __getFormattedString<T>(T val) { return val; }
#if DEBUG
        string __getFormattedString(double d) { return d.ToString("0.000000"); }
#endif
        /* Tail starts here */
    }

#if TORIQ
    static void Pretest()
    {
        assert(Solution.greedy(6, 9, 2, 4), 4);
        assert(Solution.greedy(6, 10, 2, 4), 2);
        assert(Solution.greedy(2, 1, 1, 1), 1);
    }
    static void MainTest()
    {
        Test(File.ReadAllText("input.txt")
            , File.ReadAllText("output.txt")
            );
        //
    }
#endif

    // =============================================================================================

    #region faSTDIO
    [DebuggerNonUserCode]
    static void Main(String[] args)
    {
#if TORIQ
        zTestSuite();
        //new Solution().zInternalTestSuite();
        return;
#endif
#if GOOGLE
        zGoogle();
        return;
#endif
        new Solution().zStart();
    }

    static IEnumerable<char> Read()
    {
        int cin;
        var empty = true;
        while ((cin = Console.Read()) > -1)
        {
            var c = (char)cin;
            if (c == ' ' || c == '\n' || c == '\r' || c == '\t')
            {
                if (empty) continue;
                else break;
            }
            yield return c;
            empty = false;
        }
    }
    static T Read<T>(Converter<string, T> convert, int capacity = 20)
    { var temp = ReadString(capacity); return convert(temp); }
    static string ReadString(int capacity = 1000000)
    {
        capacity += Solution.PAD_FACTOR;
        var ans = new System.Text.StringBuilder(capacity);
        foreach (var c in Read()) ans.Append(c);
        return ans.ToString();
    }
    static string ReadLine(int capacity = 1000000)
    {
        capacity += Solution.PAD_FACTOR;
        var ans = Console.ReadLine();
        if (string.IsNullOrWhiteSpace(ans.Trim()))
            ans = Console.ReadLine();
        return ans;
    }
    static int ReadInt32() { return Read(Convert.ToInt32); }
    static long ReadLong64() { return Read(Convert.ToInt64); }

    #endregion
    #region Convert
    public static int int32(this long i64) { return Convert.ToInt32(i64); }
    public static int int32(this double dec64) { return Convert.ToInt32(dec64); }
    public static long long64(this int i32) { return (long)i32; }
    public static long long64(this double dec64) { return Convert.ToInt64(dec64); }
    public static double double64(this long i64) { return Convert.ToDouble(i64); }
    public static double double64(this int i32) { return (double)i32; }
    #endregion
    #region LIBS
    [DebuggerNonUserCode]
    public static void assert(bool mustBeTrue, string message = "ASSERTION FAILED", params object[] args)
    {
        if (mustBeTrue == false)
            throw new ApplicationException(string.Format(message, args));
    }

    [DebuggerNonUserCode]
    public static T assert<T>(T actual, T expected)
    {
        if (object.Equals(actual, expected) == false)
        {
            Debug.WriteLine(expected, "CORRECT");
            Debug.WriteLine(actual, "ACTUAL");
            assert(false, "[{0}] SHOULD BE [{1}]", actual, expected);
        }
        return actual;
    }

    [Conditional("DEBUG")]
    public static void EmptyConditionalDebugBreak() { }

    public static bool isLrLeftRight<T>(T left, T right) where T : IComparable<T>
    { return left.CompareTo(right) <= 0; }

    [DebuggerNonUserCode]
    public static void lrLeftRight_ASSERT<T>(T left, T right) where T : IComparable<T>
    { assert(isLrLeftRight(left, right), "Expect left [{0}] <= [{1}] right", left, right); }

    public static IEnumerable<T> forEach<T>(this IEnumerable<T> range, Action<T> action)
    { foreach (var elem in range) action(elem); return range; }

    [DebuggerNonUserCode]
    public static void __AssertIncrStep(double incrStep) { assert(incrStep > 0, "Expect 'incrStep [{0}] > 0'", incrStep); }

    public static long add64(long a, long b) { return a + b; }
    public static long mult64(long a, long b) { return a * b; }
    public static double div(double dividend, double divisor) { return dividend / divisor; }
    public static int ceil(double d) { return Convert.ToInt32(Math.Ceiling(d)); }
    public static int ceil(double dividend, double divisor) { return ceil(div(dividend, divisor)); }
    public static long ceil64(double d) { return Convert.ToInt64(Math.Ceiling(d)); }
    public static int floor(double d) { return Convert.ToInt32(Math.Floor(d)); }
    public static int floor(double dividend, double divisor) { return floor(div(dividend, divisor)); }
    public static long floor64(double d) { return Convert.ToInt64(Math.Floor(d)); }

    public static IEnumerable<int> rangeUntil(int left, int right, int incrStep = 1)
    {
        lrLeftRight_ASSERT(left, right);
        __AssertIncrStep(incrStep);
        for (var i = left; i <= right; i += incrStep) yield return i;
    }
    public static IEnumerable<int> rangeReverse(int left, int right, int decrStep = 1)
    {
        lrLeftRight_ASSERT(left, right);
        __AssertIncrStep(decrStep);
        for (var i = right; i >= left; i -= decrStep) yield return i;
    }

    #endregion

    // =============================================================================================

}


using System;

namespace RockPaintings
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] tmp = Console.ReadLine().Split(' ');
            Int64 n = Int64.Parse(tmp[0]);
            Int64 k = Int64.Parse(tmp[1]);

            Int64 min = k > 1000000 ? 1000000 : k;

            for (int i = 1; i <= min; i++)
            {
                if (n % i < i - 1)
                {
                    Console.WriteLine("NO");
                    break;
                }
            }
            Console.WriteLine("YES");
        }
    }
}


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;

namespace CodeforcesTemplate
{
    public static class Permutation
    {
        private static bool Next(ref int[] arr)
        {
            int k, j, l;
            for (j = arr.Length - 2; (j >= 0) && (arr[j] >= arr[j + 1]); j--) { }
            if (j == -1)
            {
                arr = arr.OrderBy(c => c).ToArray();
                return false;
            }
            for (l = arr.Length - 1; (arr[j] >= arr[l]) && (l >= 0); l--) { }
            var tmp = arr[j];
            arr[j] = arr[l];
            arr[l] = tmp;
            for (k = j + 1, l = arr.Length - 1; k < l; k++, l--)
            {
                tmp = arr[k];
                arr[k] = arr[l];
                arr[l] = tmp;
            }
            return true;
        }
        public static IEnumerable<int[]> AllPermutations(int[] arr)
        {
            do yield return arr;
            while (Next(ref arr));
        }
    }

    class Program
    {
        private const string FILENAME = "distance4";

        private const string INPUT = FILENAME + ".in";

        private const string OUTPUT = FILENAME + ".out";

        private static Stopwatch _stopwatch = new Stopwatch();

        private static StreamReader _reader = null;
        private static StreamWriter _writer = null;

        private static string[] _curLine;
        private static int _curTokenIdx;

        private static char[] _whiteSpaces = new char[] { ' ', '\t', '\r', '\n' };

        private static string ReadNextToken()
        {
            if (_curTokenIdx >= _curLine.Length)
            {
                //Read next line
                string line = _reader.ReadLine();
                if (line != null)
                    _curLine = line.Split(_whiteSpaces, StringSplitOptions.RemoveEmptyEntries);
                else
                    _curLine = new string[] { };
                _curTokenIdx = 0;
            }

            if (_curTokenIdx >= _curLine.Length)
                return null;

            return _curLine[_curTokenIdx++];
        }

        private static int ReadNextInt()
        {
            return int.Parse(ReadNextToken());
        }

        private static void RunTimer()
        {
#if (DEBUG)

            _stopwatch.Start();

#endif
        }

        private static void Main(string[] args)
        {

#if (DEBUG)
            double before = GC.GetTotalMemory(false);
#endif

            int[] arr = Console.ReadLine().Split().Select(int.Parse).ToArray();

            long n = arr[1];
            long k = arr[0];

            for (int i = 1; i <= k; i++)
            {
                if ((n + 1) % i != 0)
                {
                    Console.WriteLine("No");
                    return;
                }
                else if (i == k)
                {
                    Console.WriteLine("Yes");
                    return;
                }
            }

#if (DEBUG)
            _stopwatch.Stop();

            double after = GC.GetTotalMemory(false);

            double consumedInMegabytes = (after - before) / (1024 * 1024);

            Console.WriteLine($"Time elapsed: {_stopwatch.Elapsed}");

            Console.WriteLine($"Consumed memory (MB): {consumedInMegabytes}");

            Console.ReadKey();
#endif

        }

        private static int CountLeadZeros(string source)
        {
            int countZero = 0;

            for (int i = source.Length - 1; i >= 0; i--)
            {
                if (source[i] == '0')
                {
                    countZero++;
                }

                else
                {
                    break;
                }

            }

            return countZero;
        }

        private static string ReverseString(string source)
        {
            char[] reverseArray = source.ToCharArray();

            Array.Reverse(reverseArray);

            string reversedString = new string(reverseArray);

            return reversedString;
        }

        private static int[] CopyOfRange(int[] src, int start, int end)
        {
            int len = end - start;
            int[] dest = new int[len];
            Array.Copy(src, start, dest, 0, len);
            return dest;
        }

        private static string StreamReader()
        {

            if (_reader == null)
                _reader = new StreamReader(INPUT);
            string response = _reader.ReadLine();
            if (_reader.EndOfStream)
                _reader.Close();
            return response;

        }

        private static void StreamWriter(string text)
        {

            if (_writer == null)
                _writer = new StreamWriter(OUTPUT);
            _writer.WriteLine(text);

        }

        private static int BFS(int start, int end, int[,] arr)
        {
            Queue<KeyValuePair<int, int>> queue = new Queue<KeyValuePair<int, int>>();
            List<bool> visited = new List<bool>();
            for (int i = 0; i < arr.GetLength(0); i++)
            {
                visited.Add(false);
            }

            queue.Enqueue(new KeyValuePair<int, int>(start, 0));
            KeyValuePair<int, int> node;
            int level = 0;
            bool flag = false;

            while (queue.Count != 0)
            {
                node = queue.Dequeue();
                if (node.Key == end)
                {
                    return node.Value;
                }
                flag = false;
                for (int i = 0; i < arr.GetLength(0); i++)
                {

                    if (arr[node.Key, i] == 1)
                    {
                        if (visited[i] == false)
                        {
                            if (!flag)
                            {
                                level = node.Value + 1;
                                flag = true;
                            }
                            queue.Enqueue(new KeyValuePair<int, int>(i, level));
                            visited[i] = true;
                        }
                    }
                }

            }
            return 0;

        }

        private static void Write(string source)
        {
            File.WriteAllText(OUTPUT, source);
        }

        private static string ReadString()
        {
            return File.ReadAllText(INPUT);
        }

        private static void WriteStringArray(string[] source)
        {
            File.WriteAllLines(OUTPUT, source);
        }

        private static string[] ReadStringArray()
        {
            return File.ReadAllLines(INPUT);
        }

        private static int[] GetIntArray()
        {
            return ReadString().Split(' ').Select(int.Parse).ToArray();
        }

        private static double[] GetDoubleArray()
        {
            return ReadString().Split(' ').Select(double.Parse).ToArray();
        }

        private static int[,] ReadINT2XArray(List<string> lines)
        {
            int[,] arr = new int[lines.Count, lines.Count];

            for (int i = 0; i < lines.Count; i++)
            {
                int[] row = lines[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

                for (int j = 0; j < lines.Count; j++)
                {
                    arr[i, j] = row[j];
                }
            }

            return arr;
        }
    }
}


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

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            List<long> results = new List<long>();
            for (int i = 1; i <= input[1]; i++)
            {
                var t = input[0] % i;
                if (results.Contains(t))
                {
                    Console.WriteLine("No");
                    return;
                }
                results.Add(t);
            }
            Console.WriteLine("Yes");
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Cave_Painting
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            writer.WriteLine(Solve(args) ? "Yes" : "No");
            writer.Flush();
        }

        private static bool Solve(string[] args)
        {
            long n = Next();
            long k = Next();

            var h = new HashSet<long>();
            for (int i = 1; i <= k; i++)
            {
                if (!h.Add(n%i))
                    return false;
            }

            return true;
        }

        private static long Next()
        {
            int c;
            long res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


using System;

namespace RockPaintings
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] tmp = Console.ReadLine().Split(' ');
            Int64 n = Int64.Parse(tmp[0]);
            Int64 k = Int64.Parse(tmp[1]);

            Int64 min = k > 1000000 ? 1000000 : k;

            for (int i = 1; i <= min; i++)
            {
                if (n % i < i - 1)
                {
                    Console.WriteLine("NO");
                    return;
                }
            }
            Console.WriteLine("YES");
        }
    }
}


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

namespace CavePainting
{
    class Program
    {
        static void Main(string[] args)
        {
            var longs = Console.ReadLine().Split().Select(ulong.Parse);
            ulong n = longs.ElementAt(0), k = longs.ElementAt(1);

            List<ulong> leftOvers = new List<ulong>();
            ulong tmp;
            ulong i = 1;

            for ( ;i <= k; i++)
            {
                tmp = n % i;

                if (!leftOvers.Contains(tmp)) leftOvers.Add(tmp);
                else break;
            }

            if (i == k+1) Console.WriteLine("Yes");
            else Console.WriteLine("No");

        }
    }
}


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

namespace Codeforces
{
   class C
   {
      static void Main(string[] args)
      {
         string[] token = Console.ReadLine().Split();
         long n = long.Parse(token[0]);
         long k = long.Parse(token[1]);

         List<long> li = new List<long>();

         for(int i=1;i<=k;i++){
           long rem = n%i;
           if(li.Contains(rem)){
             Console.WriteLine("No");
             return;
           }
           li.Add(rem);
         }

        Console.WriteLine("Yes");

      }
   }

}


using System;

namespace CSharp
{
    class _922C
    {
        public static void Main()
        {
            var tokens = Console.ReadLine().Split();

            long n = long.Parse(tokens[0]);
            long k = long.Parse(tokens[1]);

            for (int i = 1; i <= k; i++)
            {
                if (n % i != i - 1)
                {
                    Console.WriteLine("No");
                    return;
                }
            }

            Console.WriteLine("Yes");
        }
    }
}


using System;
namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split();
            long n = long.Parse(input[0]);
            long k = long.Parse(input[1]);
            bool success = true;
            for (long c = 2; c <= k; ++c) {
                if (n % c != c - 1) {
                    success = false;
                    break;
                }
            }
            if (success)
                Console.WriteLine("Yes");
            else
                Console.WriteLine("No");
        }
    }
}


    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

            var n = int.Parse(input[0]);
            var k = int.Parse(input[1]);

            if(k >= 43)
            {
                Console.WriteLine("No");
                return;
            }

            for (var i = 1; i <= k; i++)
            {
                if (n % i != i - 1)
                {
                    Console.WriteLine("No");
                    return;
                }
            }

            Console.WriteLine("Yes");
        }
    }


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

namespace TestApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

            var n = int.Parse(input[0]);
            var k = int.Parse(input[1]);

            if(k >= 43)
            {
                Console.WriteLine("No");
                return;
            }

            for (var i = 1; i <= k; i++)
            {
                if (n % i != i - 1)
                {
                    Console.WriteLine("No");
                    return;
                }
            }

            Console.WriteLine("Yes");
        }
    }
}


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

namespace CavePainting
{
    class Program
    {
        static void Main(string[] args)
        {
            var ints = Console.ReadLine().Split().Select(int.Parse);
            int n = ints.ElementAt(0), k = ints.ElementAt(1);

            List<int> leftOvers = new List<int>();
            int tmp;
            int i = 1;

            for ( ;i <= k; i++)
            {
                tmp = n % i;

                if (!leftOvers.Contains(tmp)) leftOvers.Add(tmp);
                else break;
            }

            if (i == k+1) Console.WriteLine("Yes");
            else Console.WriteLine("No");

        }
    }
}


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;

namespace CodeforcesTemplate
{
    public static class Permutation
    {
        private static bool Next(ref int[] arr)
        {
            int k, j, l;
            for (j = arr.Length - 2; (j >= 0) && (arr[j] >= arr[j + 1]); j--) { }
            if (j == -1)
            {
                arr = arr.OrderBy(c => c).ToArray();
                return false;
            }
            for (l = arr.Length - 1; (arr[j] >= arr[l]) && (l >= 0); l--) { }
            var tmp = arr[j];
            arr[j] = arr[l];
            arr[l] = tmp;
            for (k = j + 1, l = arr.Length - 1; k < l; k++, l--)
            {
                tmp = arr[k];
                arr[k] = arr[l];
                arr[l] = tmp;
            }
            return true;
        }
        public static IEnumerable<int[]> AllPermutations(int[] arr)
        {
            do yield return arr;
            while (Next(ref arr));
        }
    }

    class Program
    {
        private const string FILENAME = "distance4";

        private const string INPUT = FILENAME + ".in";

        private const string OUTPUT = FILENAME + ".out";

        private static Stopwatch _stopwatch = new Stopwatch();

        private static StreamReader _reader = null;
        private static StreamWriter _writer = null;

        private static string[] _curLine;
        private static int _curTokenIdx;

        private static char[] _whiteSpaces = new char[] { ' ', '\t', '\r', '\n' };

        private static string ReadNextToken()
        {
            if (_curTokenIdx >= _curLine.Length)
            {
                //Read next line
                string line = _reader.ReadLine();
                if (line != null)
                    _curLine = line.Split(_whiteSpaces, StringSplitOptions.RemoveEmptyEntries);
                else
                    _curLine = new string[] { };
                _curTokenIdx = 0;
            }

            if (_curTokenIdx >= _curLine.Length)
                return null;

            return _curLine[_curTokenIdx++];
        }

        private static int ReadNextInt()
        {
            return int.Parse(ReadNextToken());
        }

        private static void RunTimer()
        {
#if (DEBUG)

            _stopwatch.Start();

#endif
        }

        private static void Main(string[] args)
        {

#if (DEBUG)
            double before = GC.GetTotalMemory(false);
#endif

            int[] arr = Console.ReadLine().Split().Select(int.Parse).ToArray();

            long n = arr[0];
            long k = arr[1];

            for (int i = 1; i <= k; i++)
            {
                if ((n + 1) % i != 0)
                {
                    Console.WriteLine("No");
                    return;
                }
                else if (i == k)
                {
                    Console.WriteLine("Yes");
                    return;
                }
            }

#if (DEBUG)
            _stopwatch.Stop();

            double after = GC.GetTotalMemory(false);

            double consumedInMegabytes = (after - before) / (1024 * 1024);

            Console.WriteLine($"Time elapsed: {_stopwatch.Elapsed}");

            Console.WriteLine($"Consumed memory (MB): {consumedInMegabytes}");

            Console.ReadKey();
#endif

        }

        private static int CountLeadZeros(string source)
        {
            int countZero = 0;

            for (int i = source.Length - 1; i >= 0; i--)
            {
                if (source[i] == '0')
                {
                    countZero++;
                }

                else
                {
                    break;
                }

            }

            return countZero;
        }

        private static string ReverseString(string source)
        {
            char[] reverseArray = source.ToCharArray();

            Array.Reverse(reverseArray);

            string reversedString = new string(reverseArray);

            return reversedString;
        }

        private static int[] CopyOfRange(int[] src, int start, int end)
        {
            int len = end - start;
            int[] dest = new int[len];
            Array.Copy(src, start, dest, 0, len);
            return dest;
        }

        private static string StreamReader()
        {

            if (_reader == null)
                _reader = new StreamReader(INPUT);
            string response = _reader.ReadLine();
            if (_reader.EndOfStream)
                _reader.Close();
            return response;

        }

        private static void StreamWriter(string text)
        {

            if (_writer == null)
                _writer = new StreamWriter(OUTPUT);
            _writer.WriteLine(text);

        }

        private static int BFS(int start, int end, int[,] arr)
        {
            Queue<KeyValuePair<int, int>> queue = new Queue<KeyValuePair<int, int>>();
            List<bool> visited = new List<bool>();
            for (int i = 0; i < arr.GetLength(0); i++)
            {
                visited.Add(false);
            }

            queue.Enqueue(new KeyValuePair<int, int>(start, 0));
            KeyValuePair<int, int> node;
            int level = 0;
            bool flag = false;

            while (queue.Count != 0)
            {
                node = queue.Dequeue();
                if (node.Key == end)
                {
                    return node.Value;
                }
                flag = false;
                for (int i = 0; i < arr.GetLength(0); i++)
                {

                    if (arr[node.Key, i] == 1)
                    {
                        if (visited[i] == false)
                        {
                            if (!flag)
                            {
                                level = node.Value + 1;
                                flag = true;
                            }
                            queue.Enqueue(new KeyValuePair<int, int>(i, level));
                            visited[i] = true;
                        }
                    }
                }

            }
            return 0;

        }

        private static void Write(string source)
        {
            File.WriteAllText(OUTPUT, source);
        }

        private static string ReadString()
        {
            return File.ReadAllText(INPUT);
        }

        private static void WriteStringArray(string[] source)
        {
            File.WriteAllLines(OUTPUT, source);
        }

        private static string[] ReadStringArray()
        {
            return File.ReadAllLines(INPUT);
        }

        private static int[] GetIntArray()
        {
            return ReadString().Split(' ').Select(int.Parse).ToArray();
        }

        private static double[] GetDoubleArray()
        {
            return ReadString().Split(' ').Select(double.Parse).ToArray();
        }

        private static int[,] ReadINT2XArray(List<string> lines)
        {
            int[,] arr = new int[lines.Count, lines.Count];

            for (int i = 0; i < lines.Count; i++)
            {
                int[] row = lines[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

                for (int j = 0; j < lines.Count; j++)
                {
                    arr[i, j] = row[j];
                }
            }

            return arr;
        }
    }
}


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

class Program
{
    public static void Main(string[] args)
    {
        char[] ch = new char[] { '>', '<', '+', '-', '.', ',', '[', ']' };
        string[] binary = new string[] { "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" };
        string input = Console.ReadLine();
        string output = "";
        int i , j;
        foreach (char c in input)
        {
            long k = 0;
            for (i = 0; i < ch.Length; i++)
            {
                if (c == ch[i])
                {
                    k = i;
                    break;
                }
            }
            output += binary[k];
        }
        int n = output.Length;
        Console.WriteLine(n);
        int res = 0;
        if (n < 21)
        {
            for (i = 0; i < n; i++)
            {

                if (output[i] == '1')
                {
                    res += (int)Math.Pow(2, n - i - 1);
                }
            }
        }
        else
        {
            for (i = 0; i < n; i++)
            {
                //int res1 = 0;
                int temp = 1;
                if (output[i] == '1')
                {
                    for (j = 0; j < n - i - 1; j++)
                    {
                        temp *= 2;
                        temp %= 1000003;
                    }
                }
                res += temp;
                //res %= 1000003;
            }
            Console.WriteLine(res);
        }
        Console.WriteLine(res % 1000003);
        //Console.WriteLine(output);
        Console.ReadKey();
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
           // int n = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();
            //string[] s = Console.ReadLine().Split(' ');
            //List<int> list = new List<int>();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }
            Int64 _int = Convert.ToInt64(str, 2) % 1000003;

            Console.Write("{0}", _int);
        }
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
           // int n = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();
            //string[] s = Console.ReadLine().Split(' ');
            //List<int> list = new List<int>();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }
            int _int = Convert.ToInt32(str, 2) % 1000003;

            Console.Write("{0}", _int);
        }
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static string tobin(string str)
        {
            Int64 k=0;
            Int64 count = 0, result = 0;

            for (int i = str.Length - 1; i >= 0; --i)
            {
                int j = int.Parse(str[i].ToString());
                if (count != 0 || j != 0)
                    result += (Int64)Math.Pow(j * 2.0, count);
                count++;
            }

            return Math.Abs(result).ToString();
        }

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }

            Console.Write("{0}", Int64.Parse(tobin(str)) % 1000003);
            Console.ReadKey();
        }
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        private static double[] TwoPowArray = new double[64];
        public static void GenericTwoPow()
        {
            for (int i = 0; i < 64; i++)
            {
                TwoPowArray[i] = Math.Pow(2, i);
            }
        }
        public static string BitToDec(string value)
        {
            double res = 0;
            try
            {
                char[] array = value.ToCharArray();
                Array.Reverse(array);
                value = new String(array);
                for (int i = 0; i < value.Length; i++)
                {
                    if (value[i].Equals('1'))
                    {
                        res += TwoPowArray[i];
                    }
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            return res.ToString();
        }

        static void Main(string[] args)
        {
           // int n = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();
            //string[] s = Console.ReadLine().Split(' ');
            //List<int> list = new List<int>();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }
            GenericTwoPow();
            Int64 o = Int64.Parse(BitToDec(str)) % 1000003;
           // Int64 _int = Convert.ToInt64(str, 2) % 1000003;

            Console.Write("{0}", o);
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;

class Problem_B
{
    static int modPow(int a, int n, int m)
    {
        int t = a % m;
        int res = 1;
        for (int i = 0; i < n; ++i)
        {
            res = (res * t) % m;
        }
        return res;
    }
    static void Main(string[] args)
    {
        int M = 1000003;
        string line = Console.ReadLine();

        int res = 0;
        string binary = "";
        for (int i = 0; i < line.Length; ++i)
        {
            switch (line[i])
            {
                case '>': binary += "1000"; break;
                case '<': binary += "1001"; break;
                case '+': binary += "1010"; break;
                case '-': binary += "1011"; break;
                case '.': binary += "1100"; break;
                case ',': binary += "1101"; break;
                case '[': binary += "1110"; break;
                case ']': binary += "1111"; break;
            }
        }
        for (int i = 0; i < binary.Length; ++i)
        {
            if (binary[i] == '1')
            {
                res = (res + modPow(2, binary.Length - i - 1, M)) % M;
            }
        }
        Console.WriteLine(res);
    }
}


using System;
using System.Collections.Generic;

namespace CSharp
{
    class _133B
    {
        public static void Main()
        {
            var map = new Dictionary<char, int>
            {
                { '>' , 0b1000 },
                { '<' , 0b1001 },
                { '+' , 0b1010 },
                { '-' , 0b1011 },
                { '.' , 0b1100 },
                { ',' , 0b1101 },
                { '[' , 0b1110 },
                { ']' , 0b1111 }
            };

            int size = 0;
            foreach (var c in Console.ReadLine())
            {
                size = (size * 16 + map[c]) % 1000003;
            }

            Console.WriteLine(size);
        }
    }
}


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

class Ans
{
    public int X;
    public int Diff;
}

class GFG
{
    static Dictionary<char, string> dic = new Dictionary<char, string>();
    static int mod = 1000003;

    public static void Main()
    {
        dic.Add('>', "1000");
        dic.Add('<', "1001");
        dic.Add('+', "1010");
        dic.Add('-', "1011");
        dic.Add('.', "1100");
        dic.Add(',', "1101");
        dic.Add('[', "1110");
        dic.Add(']', "1111");

        var input = Console.ReadLine().ToArray();

        StringBuilder br = new StringBuilder();

        for (int i = 0; i < input.Length; i++)
        {
            br.Append(dic[input[i]]);
        }
        int decValue = 0;
        int baseValue = 1;
        for (int i = br.Length - 1; i >= 0; i--)
        {
            decValue = (decValue + (Convert.ToInt32(br[i]-'0') * baseValue)) % mod;
            baseValue = (baseValue * 2)%mod;
        }

        Console.Write(decValue);
    }
}


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

namespace CodeForces
{
    class Program
    {
        private static void Unary()
        {
            //take the input
            string input = Console.ReadLine();
            StringBuilder Binput = new StringBuilder();
            //use the table to get the values
            foreach (char c in input)
            {
                switch (c)
                {
                    case '>':
                        Binput.Append("1000");
                        break;
                    case '<':
                        Binput.Append("1001");
                        break;
                    case '+':
                        Binput.Append("1010");
                        break;
                    case '-':
                        Binput.Append("1011");
                        break;
                    case '.':
                        Binput.Append("1100");
                        break;
                    case ',':
                        Binput.Append("1101");
                        break;
                    case '[':
                        Binput.Append("1110");
                        break;
                    case ']':
                        Binput.Append("1111");
                        break;
                    default:
                        Console.WriteLine("Wrong Token Entered");
                        break;
                }
            }
            //convert to Decimal value
           BigInteger output = toDecimal(Binput.ToString());
            output %= 1000003;// 1000003
            Console.WriteLine(output);
        }
        static private BigInteger toDecimal(string s)
        {
            BigInteger value=0;
            for (int i = 0; i < s.Length; i++)
            {
                value += BigInteger.Parse((s[i]-'0').ToString()) * BigInteger.Pow(2, s.Length - i-1);

            }

            return value;
        }

        static void Main(string[] args)
        {
            Unary();
        }

    }
}


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

namespace NEwTechTEst
{
    class Program
    {

        static void Main(string[] args)
        {
            var c = new char[] { '>', '<', '+', '-', '.', ',', '[', ']' };
            var s = Console.ReadLine();
            string n = String.Empty;
            int num = 0;
            for (int i = 0; i < s.Length; i++)
            {
                var x = Array.IndexOf(c, s[i])+8;
                var z = Convert.ToString(x, 2);
                n += z;
                num = Convert.ToInt32(n, 2) % 1000003;
                n = Convert.ToString(num, 2);
            }
            Console.WriteLine(num);
        }

    }
}


using System;
using System.IO;
using System.Numerics;
using System.Text;

namespace Unary
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        public static BigInteger BinToDec(string value)
        {
            BigInteger res = 0;
            foreach (char c in value)
            {
                res <<= 1;
                res += c == '1' ? 1 : 0;
            }
            return res;
        }

        private static void Main(string[] args)
        {
            string s = reader.ReadLine();

            var b = new StringBuilder();

            foreach (char c in s)
            {
                switch (c)
                {
                    case '>':
                        b.Append("1000");
                        break;
                    case '<':
                        b.Append("1001");
                        break;
                    case '+':
                        b.Append("1010");
                        break;
                    case '-':
                        b.Append("1011");
                        break;
                    case '.':
                        b.Append("1100");
                        break;
                    case ',':
                        b.Append("1101");
                        break;
                    case '[':
                        b.Append("1110");
                        break;
                    case ']':
                        b.Append("1111");
                        break;
                }
            }

            BigInteger bb = BinToDec(b.ToString())%1000003;

            writer.WriteLine(bb);
            writer.Flush();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Codeforces
{
    class A
    {
        private static bool s_time = false;

        static long mod = 1000003;

        private static object Go()
        {
            string s = GetString();

            Dictionary<char, int> map = new Dictionary<char, int>();
            map['>'] = 8;
            map['<'] = 9;
            map['+'] = 10;
            map['-'] = 11;
            map['.'] = 12;
            map[','] = 13;
            map['['] = 14;
            map[']'] = 15;

            long ret = 0;
            for (int i = 0; i < s.Length; i++)
            {
                ret = (ret * 16 + map[s[i]]) % mod;
            }

            return ret;
        }

        #region Template

        public static void Main(string[] args)
        {
            DateTime start = DateTime.Now;
            object output = Go();
            TimeSpan duration = DateTime.Now.Subtract(start);
            if (output != null)
                Wl<string>(output.ToString());
            if (s_time)
                Wl(duration);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            while (ioEnum == null || !ioEnum.MoveNext())
            {
                ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
            }

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            Console.WriteLine(o.ToString());
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            Wl(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        public struct Tuple<T, K> : IComparable<Tuple<T, K>>
            where T : IComparable<T>
            where K : IComparable<K>
        {
            public T Item1;
            public K Item2;

            public Tuple(T t, K k)
            {
                Item1 = t;
                Item2 = k;
            }

            public override bool Equals(object obj)
            {
                var o = (Tuple<T, K>)obj;
                return o.Item1.Equals(Item1) && o.Item2.Equals(Item2);
            }

            public override int GetHashCode()
            {
                return Item1.GetHashCode() ^ Item2.GetHashCode();
            }

            public override string ToString()
            {
                return "(" + Item1 + " " + Item2 + ")";
            }

            #region IComparable<Tuple<T,K>> Members

            public int CompareTo(Tuple<T, K> other)
            {
                int ret = Item1.CompareTo(other.Item1);
                if (ret != 0) return ret;
                return Item2.CompareTo(other.Item2);
            }

            #endregion
        }

        #endregion
    }
}


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

namespace ConsoleApplication1
{
  class Program
  {

    static void Main(string[] args)
    {
      string s = Console.ReadLine();

      int sum = 0;

      for (int i = 0; i < s.Length; i++)
      {
        int r = 0;
        if (s[i] == '>') r = 8;
        if (s[i] == '<') r = 9;
        if (s[i] == '+') r = 10;
        if (s[i] == '-') r = 11;
        if (s[i] == '.') r = 12;
        if (s[i] == ',') r = 13;
        if (s[i] == '[') r = 14;
        if (s[i] == ']') r = 15;

        for (int j = 1; j < s.Length - i; j++)
          r = (r << 4) % 1000003;

        sum = (sum + r) % 1000003;
      }

      Console.WriteLine(sum);

    }
 }
}


using System;

namespace AllProblems
{
    class _133B_Unary
    {
        public static void Run()
        {
            var s = Console.ReadLine().Trim();
            var len = s.Length;
            var key = "><+-.,[]";
            var sum = 0;

            for (var i = 0; i < len; i++)
            {
                var val = key.IndexOf(s[i]) + 8;
                sum = (sum*16 + val) % 1000003;
            }

            Console.WriteLine(sum);
            Console.ReadLine();
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            _133B_Unary.Run();

        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace Codeforces
{
    internal class Program
    {
        private static string Read()
        {
            return Console.ReadLine();
        }
        private static string[] ReadArray()
        {
            return Console.ReadLine().Split(' ');
        }
        private static int ReadInt()
        {
            return Int32.Parse(Console.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        private static int ReadNextInt(string[] input, int index)
        {
            return Int32.Parse(input[index]);
        }

        private static void Main()
        {
            int MOD = 1000003;
            var input = Read();
            input = input.Replace(">", "1000");
            input = input.Replace("<", "1001");
            input = input.Replace("+", "1010");
            input = input.Replace("-", "1011");
            input = input.Replace(".", "1100");
            input = input.Replace(",", "1101");
            input = input.Replace("[", "1110");
            input = input.Replace("]", "1111");
            var len = input.Length - 1;
            long res = 0;
            for (int i = 0; i <= len; i++)
            {
                res *= 2;
                res %= MOD;
                res += (input[i] - '0');
            }
            res %= MOD;
            Console.WriteLine(res);
        }
    }
}


using System;
class Test{
    static void Main(){
        string [, ] set = {{">", "1000"}, {"<", "1001"}, {"+", "1010"}, {"-", "1011"}, {".", "1100"}, {",", "1101"}, {"[", "1110"}, {"]", "1111"}};
        string line = "";
        string temp = Console.ReadLine();
        int i = 0, j = 0;
        for(i = 0; i < temp.Length; i++){
            for(j = 0; j < set.GetLength(0); j++){
                if(set[j, 0] == Convert.ToString(temp[i])){
                    line += set[j, 1];
                }
            }
        }
        double ans = 0;
        i = line.Length - 1;
        j = 0;
        while(i > -1){
            int line_i = int.Parse(Convert.ToString(line[i]));
            ans += (line_i * Math.Pow(2, j)) % 1000003;
            i--;
            j++;
        }
        Console.WriteLine(ans % 1000003);
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static string tobin(string str)
        {
            Int64 count = 0, result = 0;
            for (int i = str.Length - 1; i >= 0; --i)
            {
                int j = int.Parse(str[i].ToString());
                if (count != 0 || j != 0)
                {
                    result += (int)Math.Abs(Math.Pow(j * 2.0, count) % 1000003);
                }
                count++;
            }

            return (Math.Abs(result) % 1000003).ToString();
        }

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }

            Console.Write("{0}", Int64.Parse(tobin(str)));
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace codeforces
{
	class Program
	{
		public const int Osn = 1000000007;

		public class Pair
		{
			public long First;

			public long Second;
		}

		public class PairComparer : IComparer<Pair>
		{
			public int Compare(Pair x, Pair y)
			{
				if (x.First < y.First || (x.First == y.First && x.Second > y.Second))
					return -1;
				return 1;
			}
		}

		public static long GetGcd(long a, long b)
		{
			while (true)
			{
				if (b == 0)
					return a;
				var a1 = a;
				a = b;
				b = a1 % b;

			}
		}

		public static void WriteYesNo(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string ReadString()
		{
			return Console.ReadLine();
		}

		public static List<int> ReadListOfInts()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static List<long> ReadListOfLongs()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(long.Parse).ToList();
		}

		public static int ReadInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static long ReadLong()
		{
			var s = Console.ReadLine();
			return long.Parse(s);
		}

		public class Vertex
		{
			public int Was;

			public List<int> Edges;
		}

		public static List<Vertex> Graph = new List<Vertex>();

		public static bool Dfs(int u)
		{
			if (Graph[u].Was == 1) return true;
			if (Graph[u].Was == 2) return false;
			Graph[u].Was = 1;
			foreach (var t in Graph[u].Edges)
			{
				if (Dfs(t)) return true;
			}

			Graph[u].Was = 2;
			return false;
		}

		public static bool IsPrime(int x)
		{
			for (var j = 2; j * j <= x; ++j)
				if (x % j == 0)
					return false;
			return true;
		}

		public class LinkedVertex
		{
			public int Next;

			public int Prev;

			public int Value;
		}

		public static int BinarySearch(List<int> list, int value)
		{
			var l = -1;
			var r = list.Count;
			while (r - l > 1)
			{
				var m = (r + l) / 2;
				if (list[m] >= value)
					r = m;
				else
					l = m;
			}

			return r;
		}

		private static void Main()
		{
			var s = ReadString();
			long ans = 0;
			long tt = 1;
			for (var i = s.Length - 1; i >= 0; --i)
			{
				if (s[i] == '>')
					ans = (ans + tt * 8) % 1000003;
				if (s[i] == '<')
					ans = (ans + tt * 9) % 1000003;
				if (s[i] == '+')
					ans = (ans + tt * 10) % 1000003;
				if (s[i] == '-')
					ans = (ans + tt * 11) % 1000003;
				if (s[i] == '.')
					ans = (ans + tt * 12) % 1000003;
				if (s[i] == ',')
					ans = (ans + tt * 13) % 1000003;
				if (s[i] == '[')
					ans = (ans + tt * 14) % 1000003;
				if (s[i] == ']')
					ans = (ans + tt * 15) % 1000003;
				tt = (tt * 16) % 1000003;
			}
			Console.WriteLine(ans);
			Console.ReadLine();
		}
	}
}


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

namespace ACming
{
    class Program
    {
        static void Main(string[] args)
        {
           new Program().Run();
        }
        void Run()
        {
            string str = Console.ReadLine();

            Int64 res = 0;
            for (int i = 0; i < str.Length; i++)
            {
                res *= 16;
                res += 8;
                switch (str[i])
                {
                    case '>' :
                        break;
                    case '<':
                        res += 1;
                        break;
                    case '+':
                        res += 2;
                        break;
                    case '-':
                        res += 3;
                        break;
                    case '.':
                        res += 4;
                        break;
                    case ',':
                        res += 5;
                        break;
                    case '[':
                        res += 6;
                        break;
                    case ']':
                        res += 7;
                        break;

                    default:
                        break;
                }
                res %= 1000003;
            }
            Console.WriteLine(res);
        }
    }
}


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

namespace B133
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = "><+-.,[]";
            int[] b = { 8, 9,10,11,12,13,14,15 };
            int mod = 1000003;
            char[] token = Console.ReadLine().ToCharArray();
            int result=0;
            for (int i = 0; i < token.Length; i++)
            {
                result = ((result<<4)+b[a.IndexOf(token[i])]) % mod;
            }
            Console.WriteLine(result);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;

namespace some_in_sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            var Dict = new Dictionary<char, String>()
            {
                {'>', "1000"},
                {'<', "1001"},
                {'+', "1010"},
                {'-', "1011"},
                {'.', "1100"},
                {',', "1101"},
                {'[', "1110"},
                {']', "1111"}
            };

            String some_str = Console.ReadLine();
            String result = "";
            foreach (char SomeChar in some_str)
            {
                result += Dict[SomeChar];
            }

            BigInteger result_big_int = result.Aggregate(new BigInteger(), (b, c) => b * 2 + c - '0');
            System.Console.WriteLine(result_big_int % new BigInteger(1000003));

        }
    }
}


using System;

class P {
  static void Main(){
    var map = new int[1000];
    map[(int)'>'] = 8;
    map[(int)'<'] = 9;
    map[(int)'+'] = 10;
    map[(int)'-'] = 11;
    map[(int)'.'] = 12;
    map[(int)','] = 13;
    map[(int)'['] = 14;
    map[(int)']'] = 15;

    var res = 0;
    foreach (var c in Console.ReadLine())
      res = (res * 16 + map[(int)c]) % 1000003;
    Console.Write(res);
  }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Numerics;
public class Codeforces
{
    protected static TextReader reader;
    protected static TextWriter writer;
    static object Solve()
    {
        var bf = new Dictionary<char, long>() { { '>', 8 } ,{ '<' ,9 },{ '+', 10 },
            { '-', 11 },{ '.' ,12},{ ',' ,13 },{ '[' ,14 },{ ']' ,15 }};
        var p = reader.ReadLine();
        var st = 1L;
        var mod = 1000003L;
        var ans = 0L;
        for (int i = p.Length - 1; i >= 0; i--)
        {
            long tmp = bf[p[i]];
            tmp %= mod;
            st %= mod;
            tmp = (tmp * st) % mod;
            st <<= 4;
            ans += tmp;
            ans %= mod;
        }
        writer.WriteLine(ans);
        return null;
    }
    static void Main()
    {
        reader = new StreamReader(Console.OpenStandardInput(1024 * 10), System.Text.Encoding.ASCII, false, 1024 * 10);
        writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), System.Text.Encoding.ASCII, 1024 * 10);
        try
        {
            object result = Solve();
            if (result != null)
                writer.WriteLine(result);
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
            throw;
        }
        reader.Close();
        writer.Close();
    }
    #region Read / Write

    private static Queue<string> currentLineTokens = new Queue<string>();

    private static string[] ReadAndSplitLine()
    {
        return reader.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public static string ReadToken()
    {
        while (currentLineTokens.Count == 0)
            currentLineTokens = new Queue<string>(ReadAndSplitLine());
        return currentLineTokens.Dequeue();
    }

    public static int ReadInt()
    {
        return int.Parse(ReadToken());
    }

    public static long ReadLong()
    {
        return long.Parse(ReadToken());
    }

    public static double ReadDouble()
    {
        return double.Parse(ReadToken(), CultureInfo.InvariantCulture);
    }

    public static int[] ReadIntArray()
    {
        return ReadAndSplitLine().Select(int.Parse).ToArray();
    }

    public static long[] ReadLongArray()
    {
        return ReadAndSplitLine().Select(long.Parse).ToArray();
    }

    public static double[] ReadDoubleArray()
    {
        return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();
    }
    public static int[][] ReadIntMatrix(int numberOfRows)
    {
        int[][] matrix = new int[numberOfRows][];
        for (int i = 0; i < numberOfRows; i++)
            matrix[i] = ReadIntArray();
        return matrix;
    }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows);
        int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = new int[numberOfRows];
            for (int j = 0; j < numberOfRows; j++)
                ret[i][j] = matrix[j][i];
        }
        return ret;
    }

    public static string[] ReadLines(int quantity)
    {
        string[] lines = new string[quantity];
        for (int i = 0; i < quantity; i++)
            lines[i] = reader.ReadLine().Trim();
        return lines;
    }
    public static void WriteArray<T>(IEnumerable<T> array)
    {
        writer.WriteLine(string.Join(" ", array));
    }

    public static void Write<T>(params T[] array)
    {
        WriteArray(array);
    }

    public static void WriteLines<T>(IEnumerable<T> array)
    {
        foreach (var a in array)
            writer.WriteLine(a);
    }
    static int Next()
    {
        int c;
        int res = 0;
        do
        {
            c = reader.Read();
            if (c == -1)
                return res;
        } while (c != '-' && (c < '0' || c > '9'));
        int sign = 1;
        if (c == '-')
        {
            sign = -1;
            c = reader.Read();
        }
        res = c - '0';
        while (true)
        {
            c = reader.Read();
            if (c < '0' || c > '9')
                return res * sign;
            res *= 10;
            res += c - '0';
        }
    }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp5
{
    public class Program
    {
        static void Main()
        {
            var str = Console.ReadLine();
            var res = Fun(str);
            Console.WriteLine(res);

        }

        public static long Fun(string str)
        {
            var dic = new Dictionary<char, string> { { '>', "1000" }, { '<', "1001" }, { '+', "1010" }, { '-', "1011" }, { '.', "1100" }, { ',', "1101" }, { '[', "1110" }, { ']', "1111" } };
            var t = "";
            foreach (var s in str)
                t += dic[s];

            long res = 0;
            var n = 0;
            for (int i = t.Length - 1; i >= 0; i--, n++)
            {
                if (t[i] == '1')
                {
                    res += Pow(n);
                    res %= MOD;
                }
            }

            return res;
        }
        const long MOD = 1000003;
        public static long Pow(long n)
        {
            if (n == 0)
                return 1;

            if (n == 1)
                return 2;

            if (n % 2 == 0)
            {
                var t = Pow(n / 2);
                return t * t % MOD;
            }
            return Pow(n - 1) * 2;
        }
    }
}


//#define ONLINE_JUDGE

using System;
using System.Collections.Generic;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

#if  ! ONLINE_JUDGE
            var fs = new StreamReader(@"c:\1.txt");
            Console.SetIn(fs);
#endif

            Dictionary<char, byte> dd = new Dictionary<char, byte>();
            dd.Add('>', 8);
            dd.Add('<', 9);
            dd.Add('+', 10);
            dd.Add('-', 11);
            dd.Add('.', 12);
            dd.Add(',', 13);
            dd.Add('[', 14);
            dd.Add(']', 15);

            var str = Console.ReadLine();
            long ret = 0;
            long limit = 1000003;
            for (int i = 0; i < str.Length; i++)
            {

                ret = ((ret << 4)%limit + dd[str[i]]%limit)%limit;
            }

            Console.Write(ret.ToString());

#if !ONLINE_JUDGE

            fs.Close();
#endif
        }

    }
}


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

namespace MakeCalendar
{
    public static class MainClass
    {

        static int ReadIntLine()
        {
            return int.Parse(Console.ReadLine());
        }

        static void ReadInt(ref int a)
        {
            a = ReadIntArrayLine()[0];
        }

        static void ReadInts(ref int a, ref int b)
        {
            var x = ReadIntArrayLine();
            a = x[0]; b = x[1];
        }

        static void ReadInts(ref int a, ref int b, ref int c)
        {
            var x = ReadIntArrayLine();
            a = x[0]; b = x[1]; c = x[2];
        }

        static void ReadInts(ref int a, ref int b, ref int c, ref int d)
        {
            var x = ReadIntArrayLine();
            a = x[0]; b = x[1]; c = x[2]; d = x[3];
        }

        static void ReadInts(ref int a, ref int b, ref int c, ref int d, ref int e)
        {
            var x = ReadIntArrayLine();
            a = x[0]; b = x[1]; c = x[2]; d = x[3]; e = x[4];
        }

        static int[] ReadIntArrayLine()
        {
            char[] sep = { ' ' };
            return Console.ReadLine().Split(sep, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).ToArray();
        }

        static void PrintLn(object obj)
        {
            Console.WriteLine(obj.ToString());
        }

        public static string Reverse(string s)
        {
            char[] charArray = s.ToCharArray();
            Array.Reverse(charArray);
            return new string(charArray);
        }

        public static void PrintLnCollection<T>(IEnumerable<T> col)
        {
            PrintLn(string.Join(" ", col));
        }

        public static void PrintLn(params object[] v)
        {
            PrintLnCollection(v);
        }

        public static string ReadLine()
        {
            return Console.ReadLine();
        }

        public static string MySubstring(this string str, int start, int finish)
        {
            if (start > finish) return "";
            return str.Substring(start, finish - start + 1);
        }

        public static bool IsInRange(this int a, int lb, int ub)
        {
            return (a >= lb) && (a <= ub);
        }

        private static void mergeDS(int i, int j, int[] a)
        {
            int t = a[j];
            for (int ii = 0; ii < a.Length; ii++)
            {
                if (a[ii] == t)
                    a[ii] = a[i];
            }
        }

        private static T MyMax<T>(params T[] a)
        {
            return a.Max();
        }

        private static T MyMin<T>(params T[] a)
        {
            return a.Min();
        }

        //----------------------------------------------------------------------------
        static void Main(string[] args)
        {
            var codes = new Dictionary<char, int>();

            codes['>'] = 8;  //"1000";
            codes['<'] = 9;  //"1001";
            codes['+'] = 10; //"1010";
            codes['-'] = 11; //"1011";
            codes['.'] = 12; //"1100";
            codes[','] = 13; //"1101";
            codes['['] = 14; //"1110";
            codes[']'] = 15; //"1111";

            int ans=0;
            int p = 1000003;

            string s = ReadLine();

            for (int i = 0; i < s.Length; i++)
            {
                ans = (ans * 16 + codes[s[i]]) % p;
            }

            PrintLn(ans);

        }

    }

}


using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

class Solver
{
	public void Solve()
	{
		var s = CF.ReadLine();
		int res = 0;
		foreach (var c in s)
		{
			res *= 16;
			switch (c)
			{
				case '>': res += 8;  break;
				case '<': res += 9; break;
				case '+': res += 10; break;
				case '-': res += 11; break;
				case '.': res += 12; break;
				case ',': res += 13; break;
				case '[': res += 14; break;
				case ']': res += 15; break;
			}
			res %= 1000003;
		}
		CF.WriteLine(res);
	}

	//  test
	static Utils CF = new Utils(new[]{
@"
,.
"
,
@"
++++[>,.<-]
"

    });
    #region test

    static void Main(string[] args)
    {
#if DEBUG
        for (int t=0;t<CF.TestCount;t++ )
        {
            CF.Test(t);
			var sw = new Stopwatch();
			sw.Start();
            new Solver().Solve();
			Debug.WriteLine("time: "+sw.ElapsedMilliseconds+ " ms");
		}
#else
        new Solver().Solve();
#endif
    }

    class Utils
    {
        public void Test(int t)
        {
            _lines = new List<string>();
            string[] ss = _test_input[t].Replace("\n", "").Split('\r');
            for (int i = 0; i < ss.Length; i++)
            {
                if (
                    (i == 0 || i == ss.Length - 1) &&
                    ss[i].Length == 0
                    )
                    continue;

                _lines.Add(ss[i]);
            }
        }

        public int TestCount
        {
            get
            {
                return _test_input.Length;
            }
        }

        public string ReadLine()
        {
#if DEBUG
            string s = null;
            if (_lines.Count > 0)
            {
                s = _lines[0];
                _lines.RemoveAt(0);
            }
            return s;

#else
            //return _sr.ReadLine();
        return Console.In.ReadLine();
#endif
        }

        public void WriteLine(object o)
        {
#if DEBUG
            System.Diagnostics.Trace.WriteLine(o);
#else
            //_sw.WriteLine(o);
        Console.WriteLine(o);
#endif
        }

        public void Write(object o)
        {
#if DEBUG
            System.Diagnostics.Trace.Write(o);
#else
                //_sw.Write(o);
        Console.Write(o);
#endif
        }

        string[] _test_input;

        List<string> _lines;

#if DEBUG
        public Utils(string[] test_input)
        {
            _test_input = test_input;
        }
#else

        public Utils(string[] dummy)
        {
            //_sr = new System.IO.StreamReader("input.txt");
            //_sw = new System.IO.StreamWriter("output.txt");
        }
#endif

    }

    #endregion
}


using System;
using System.Collections.Generic;
using System.IO;

namespace prB {

    class Program {
#if ONLINE_JUDGE
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024 * 10), System.Text.Encoding.ASCII, false, 1024 * 10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), System.Text.Encoding.ASCII, 1024 * 10);
#else
        private static readonly StreamWriter writer = new StreamWriter(@"..\..\output");
        private static readonly StreamReader reader = new StreamReader(@"..\..\input");
#endif
        static void Main(string[] args) {
            Dictionary<char, long> dict = new Dictionary<char, long> {{'>', 8}, {'<', 9}, {'+', 10}, {'-', 11}, {'.', 12}, {',', 13}, {'[', 14}, {']', 15}};
            const long m = 1000003;
            string s = reader.ReadLine();
            long ans = 0;
            foreach(char c in s) {
                ans = (ans * 16 + dict[c]) % m;
            }
            writer.Write(ans);
            writer.Flush();
#if !ONLINE_JUDGE
            writer.Close();
#endif
        }
        private static int Next() {
            int c;
            int res = 0;
            do {
                c = reader.Read();
                if(c == -1)
                    return res;
            } while(c != '-' && (c < '0' || c > '9'));
            int sign = 1;
            if(c == '-') {
                sign = -1;
                c = reader.Read();
            }
            res = c - '0';
            while(true) {
                c = reader.Read();
                if(c < '0' || c > '9')
                    return res * sign;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


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

namespace dump
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int cnt = 0;
            foreach (char c in s)
            {
                int x = 0;
                switch (c)
                {
                    case '>':
                        x = 8;
                        break;
                    case '<':
                        x = 9;
                        break;
                    case '+':
                        x = 10;
                        break;
                    case '-':
                        x = 11;
                        break;
                    case '.':
                        x = 12;
                        break;
                    case ',':
                        x = 13;
                        break;
                    case '[':
                        x = 14;
                        break;
                    case ']':
                        x = 15;
                        break;
                }
                cnt = ((cnt<<4)%1000003 + x%1000003)%1000003;
            }
            Console.WriteLine(cnt);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

public class Program
{
    static void Main(string[] args)
    {
        Unary u = new Unary();
        //Console.ReadLine();
    }
}

public class Unary
{
    public Unary()
    {
        int i = 0;
        int j = 0;
        int k = 0;
        int tmp = 0;
        int res = 0;
        string x = Console.ReadLine();
        int[] rec = new int[405];
        for (i = x.Length-1; i >=0;i--)
        {
            switch (x[i])
            {
                case '>':
                    rec[j++] = 0;
                    rec[j++] = 0;
                    rec[j++] = 0;
                    rec[j++] = 1;
                    break;
                case '<':
                    rec[j++] = 1;
                    rec[j++] = 0;
                    rec[j++] = 0;
                    rec[j++] = 1;
                    break;
                case '+':
                    rec[j++] = 0;
                    rec[j++] = 1;
                    rec[j++] = 0;
                    rec[j++] = 1;
                    break;
                case '-':
                    rec[j++] = 1;
                    rec[j++] = 1;
                    rec[j++] = 0;
                    rec[j++] = 1;
                    break;
                case '.':
                    rec[j++] = 0;
                    rec[j++] = 0;
                    rec[j++] = 1;
                    rec[j++] = 1;
                    break;
                case ',':
                    rec[j++] = 1;
                    rec[j++] = 0;
                    rec[j++] = 1;
                    rec[j++] = 1;
                    break;
                case '[':
                    rec[j++] = 0;
                    rec[j++] = 1;
                    rec[j++] = 1;
                    rec[j++] = 1;
                    break;
                case ']':
                    rec[j++] = 1;
                    rec[j++] = 1;
                    rec[j++] = 1;
                    rec[j++] = 1;
                    break;
                default:
                    break;
            }
        }
        for (i = 0; i < j; i++)
        {
            if (rec[i] == 1)
            {
                tmp = 1;
                for (k = 0; k < i; k++)
                {
                    tmp <<= 1;
                    tmp %= 1000003;
                }
                res += tmp;
                res %= 1000003;
            }
        }
        Console.WriteLine(res);
    }
}


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

class Program
{
    public static void Main(string[] args)
    {
        char[] ch = new char[] { '>', '<', '+', '-', '.', ',', '[', ']' };
        string[] binary = new string[] { "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" };
        string input = Console.ReadLine();
        string output = "";
        int i;
        Console.WriteLine(ch.Length);
        foreach (char c in input)
        {
            long k = 0;
            for (i = 0; i < ch.Length; i++)
            {
                if (c == ch[i])
                {
                    k = i;
                    break;
                }
            }
            Console.WriteLine(binary[i]);
            output += binary[k];
        }
        long n = output.Length;
        long res = 0;
        //Console.WriteLine(n);
        for (i = 0; i < n; i++)
        {
            if (output[i] == '1')
            {
                res += (long)Math.Pow(2, n - i - 1);
            }
        }
        Console.WriteLine(res % 1000003);
        //Console.WriteLine(output);
        //Console.ReadKey();
    }
}


using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp5
{
    public class Program
    {
        static void Main()
        {
            var str = Console.ReadLine();
            var dic = new Dictionary<char, string> { { '>', "1000" }, { '<', "1001" }, { '+', "1010" }, { '-', "1011" }, { '.', "1100" }, { ',', "1101" }, { '[', "1110" }, { ']', "1111" } };
            var t = "";
            foreach (var s in str)
                t += dic[s];

            var res = 0.0;
            var n = 0;
            for (int i = t.Length - 1; i >= 0; i--, n++)
                if (t[i] == '1')
                    res += Math.Pow(2, n);

            res = res % 1000003;
            Console.WriteLine(res);

        }
    }
}


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

namespace CodeForces
{
    class Program
    {
         private static void Unary()
        {
            //take the input
            string input = Console.ReadLine();
            StringBuilder Binput = new StringBuilder();
            //use the table to get the values
            foreach (char c in input)
            {
                switch (c)
                {
                    case '>':
                        Binput.Append("1000");
                        break;
                    case '<':
                        Binput.Append("1001");
                        break;
                    case '+':
                        Binput.Append("1010");
                        break;
                    case '-':
                        Binput.Append("1011");
                        break;
                    case '.':
                        Binput.Append("1100");
                        break;
                    case ',':
                        Binput.Append("1101");
                        break;
                    case '[':
                        Binput.Append("1110");
                        break;
                    case ']':
                        Binput.Append("1111");
                        break;
                    default:
                        Console.WriteLine("Wrong Token Entered");
                        break;
                }
            }
            //convert to Decimal value
            long output = toDecimal(Binput.ToString());
            output %= 1000003;// 1000003
            Console.WriteLine(output);
        }
        static private long toDecimal(string s)
        {
            long value=0;
            for (int i = 0; i < s.Length; i++)
            {
                value += Convert.ToUInt32(s[i]-'0') * (long)Math.Pow(2, s.Length - i-1);
            }

            return value;
        }
        static void Main(string[] args)
        {
            Unary();
        }
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static string tobin(string str)
        {
            int k = 0;
            int count = 0, result = 0;
            for (int i = str.Length - 1; i >= 0; --i)
            {
                int j = int.Parse(str[i].ToString());

                    result += (int)Math.Abs(j * Math.Pow(2.0, count) % 1000003);

                count++;
            }

            return Math.Abs(result).ToString();
        }

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }

            Console.Write("{0}", Math.Abs(int.Parse(tobin(str))));
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;

class Problem_B
{
    static int modPow(int a, int n, int m)
    {
        int t = a % m;
        int res = t;
        for (int i = 1; i < n; ++i)
        {
            res = (res * t) % m;
        }
        return res;
    }
    static void Main(string[] args)
    {
        int M = 1000003;
        string line = Console.ReadLine();

        int res = 0;
        string binary = "";
        for (int i = 0; i < line.Length; ++i)
        {
            switch (line[i])
            {
                case '>': binary += "1000"; break;
                case '<': binary += "1001"; break;
                case '+': binary += "1010"; break;
                case '-': binary += "1011"; break;
                case '.': binary += "1100"; break;
                case ',': binary += "1101"; break;
                case '[': binary += "1110"; break;
                case ']': binary += "1111"; break;
            }
        }

        for (int i = 0; i < binary.Length; ++i)
        {
            if (binary[i] == '1')
            {
                res = (res + modPow(2, binary.Length - i - 1, M)) % M;
            }
        }
        Console.WriteLine(res);
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static string tobin(string str)
        {
            Int64 k = 0;
            Int64 count = 0, result = 0;

            for (int i = str.Length - 1; i >= 0; --i)
            {
                int j = int.Parse(str[i].ToString());
                if (count != 0 || j != 0)
                    result += (Int64)Math.Pow(j * 2.0, count);
                count++;
            }

            return Math.Abs(result).ToString();
        }

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }

            Console.Write("{0}", Int64.Parse(tobin(str)) % 1000003);
        }
    }
}


using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication
{
    class Program
    {
        static string tobin(string str)
        {
            Int64 k = 0;
            Int64 count = 0, result = 0;
            for (int i = str.Length - 1; i >= 0; --i)
            {
                int j = int.Parse(str[i].ToString());
                if (count != 0 || j != 0)
                {
                    result += (Int64)Math.Pow(j * 2.0, count);
                    k += Math.Abs((Int64)Math.Pow(j * 2.0, count) % 1000003);
                }
                count++;
            }

            return Math.Abs(k).ToString();
        }

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string str = "";

            for (int i = 0; i <= s.Length - 1; i++)
            {
                switch (s[i])
                {
                    case '>':
                        {
                            str += "1000";
                            break;
                        }
                    case '<':
                        {
                            str += "1001";
                            break;
                        }
                    case '+':
                        {
                            str += "1010";
                            break;
                        }
                    case '-':
                        {
                            str += "1011";
                            break;
                        }
                    case '.':
                        {
                            str += "1100";
                            break;
                        }
                    case ',':
                        {
                            str += "1101";
                            break;
                        }
                    case '[':
                        {
                            str += "1110";
                            break;
                        }
                    case ']':
                        {
                            str += "1111";
                            break;
                        }
                }
            }

            Console.Write("{0}", Math.Abs(Int64.Parse(tobin(str)) % 1000003));
        }
    }
}


using System;
class Test{
    static void Main(){
        string [, ] set = {{">", "1000"}, {"<", "1001"}, {"+", "1010"}, {"-", "1011"}, {".", "1100"}, {",", "1101"}, {"[", "1110"}, {"]", "1111"}};
        string line = "";
        string temp = Console.ReadLine();
        int i = 0, j = 0;
        for(i = 0; i < temp.Length; i++){
            for(j = 0; j < set.GetLength(0); j++){
                if(set[j, 0] == Convert.ToString(temp[i])){
                    line += set[j, 1];
                }
            }
        }
        long ans = 0;
        i = line.Length - 1;
        j = 0;
        while(i > -1){
            int line_i = int.Parse(Convert.ToString(line[i]));
            ans += line_i * (long)Math.Pow(2, j);
            ans %= 1000003;
            i--;
            j++;
        }
        Console.WriteLine(ans);
    }
}


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

class Program
{
    public static void Main(string[] args)
    {
        char[] ch = new char[] { '>', '<', '+', '-', '.', ',', '[', ']' };
        string[] binary = new string[] { "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" };
        string input = Console.ReadLine();
        string output = "";
        int i , j;
        foreach (char c in input)
        {
            long k = 0;
            for (i = 0; i < ch.Length; i++)
            {
                if (c == ch[i])
                {
                    k = i;
                    break;
                }
            }
            output += binary[k];
        }
        int n = output.Length;
        //Console.WriteLine(n);
        int res = 0;
        if (n < 21)
        {
            for (i = 0; i < n; i++)
            {

                if (output[i] == '1')
                {
                    res += (int)Math.Pow(2, n - i - 1);
                }
            }
        }
        else
        {
            for (i = 0; i < n; i++)
            {
                //int res1 = 0;
                int temp = 1;
                if (output[i] == '1')
                {
                    for (j = 0; j < n - i - 1; j++)
                    {
                        temp *= 2;
                        temp %= 1000003;
                    }
                }
                res += temp;
                //res %= 1000003;
            }
            //Console.WriteLine(res);
        }
        Console.WriteLine(res % 1000003);
        //Console.WriteLine(output);
        //Console.ReadKey();
    }
}


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

class Ans
{
    public int X;
    public int Diff;
}

class GFG
{
    static Dictionary<char, string> dic = new Dictionary<char, string>();
    static ulong mod = 1000003;

    public static void Main()
    {
        dic.Add('>', "1000");
        dic.Add('<', "1001");
        dic.Add('+', "1010");
        dic.Add('-', "1011");
        dic.Add('.', "1100");
        dic.Add(',', "1101");
        dic.Add('[', "1110");
        dic.Add(']', "1111");

        var input = Console.ReadLine().ToArray();

        StringBuilder br = new StringBuilder();

        for (int i = 0; i < input.Length; i++)
        {
            br.Append(dic[input[i]]);
        }
        ulong decValue = 0;
        ulong baseValue = 1;
        for (int i = br.Length - 1; i >= 0; i--)
        {
            decValue = (decValue + (Convert.ToUInt64(br[i]-'0') * baseValue)) % mod;
            baseValue = baseValue * 2;
        }

        Console.Write(decValue);
    }
}