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

namespace Codeforces
{
    class Program
    {
        static StreamReader reader;
        static StreamWriter writer;
        static Random rand = new Random(0);
        static int Min;
        static int[] x_directions = new int[] { -1, +1, 0, 0 };
        static int[] y_directions = new int[] { 0, 0, -1, +1 };
        static List<MyPair> pairs = new List<MyPair>();

        static void Main(string[] args)
        {
            //#if DEBUG
            reader = new StreamReader(Console.OpenStandardInput(32768), Encoding.ASCII, false, 32768);
            writer = new StreamWriter(Console.OpenStandardOutput(32768), Encoding.ASCII, 32768);
            //#else
            //            StreamReader streamReader = new StreamReader(Console.OpenStandardInput(32768), Encoding.ASCII, false, 32768);
            //            StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(32768), Encoding.ASCII, 32768);
            //#endif
            InputReader input = new InputReader(reader);

            long n = input.NextLong();
            long k = input.NextLong();
            writer.WriteLine(n % k != 0 ? Math.Ceiling(n * 1.0 / k) * k : (n / k + 1) * k);

#if DEBUG
                Console.BackgroundColor = ConsoleColor.White;
            Console.ForegroundColor = ConsoleColor.Black;
#endif
            writer.Flush();
            writer.Close();
            reader.Close();
        }
    }

    class MyPair
    {
        public int x, y;

        public MyPair(int x, int y)
        {
            this.x = x;
            this.y = y;
        }
    }

    // this class is copy
    class InputReader
    {
        private char[] _inbuf;
        private int _lenbuf = 0, _ptrbuf = 0;
        private StreamReader _reader;

        public InputReader(StreamReader reader)
        {
            _reader = reader;
            _inbuf = new char[1024];
            _lenbuf = 0;
            _ptrbuf = 0;
        }

        private int ReadByte()
        {
            if (_lenbuf == -1)
                throw new Exception();
            if (_ptrbuf >= _lenbuf)
            {
                _ptrbuf = 0;
                try
                {
                    _lenbuf = _reader.Read(_inbuf, 0, 1024);
                }
                catch (IOException e)
                {
                    throw e;
                }
                if (_lenbuf <= 0)
                    return -1;
            }
            return _inbuf[_ptrbuf++];
        }

        private bool IsSpaceChar(int c)
        {
            return !(c >= 33 && c <= 126);
        }

        private int Skip()
        {
            int b;
            while ((b = ReadByte()) != -1 && IsSpaceChar(b)) ;
            return b;
        }

        public int NextInt()
        {
            return int.Parse(this.Next());
        }

        public int[] NextIntArray(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = NextInt();
            }
            return a;
        }

        public long NextLong()
        {
            return long.Parse(this.Next());
        }

        public string Next()
        {
            var b = Skip();
            var sb = new StringBuilder();
            while (!(IsSpaceChar(b)))
            {
                sb.Append((char)b);
                b = ReadByte();
            }
            return sb.ToString();
        }

        public double NextDouble()
        {
            return double.Parse(Next(), CultureInfo.InvariantCulture);
        }

        internal long[] NextLongArray(long n)
        {
            long[] a = new long[(int)n];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = NextLong();
            }
            return a;
        }

        internal double[] NextDoubleArray(int n)
        {
            double[] a = new double[n];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = NextDouble();
            }
            return a;
        }
    }
}

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

namespace ConsoleApplication1
{
    public static class Cin
    {
        public static string NextToken()
        {
            StringBuilder tokenChars = new StringBuilder();
            bool tokenFinished = false;
            bool skipWhiteSpaceMode = true;
            while (!tokenFinished)
            {
                int nextChar = Console.Read();
                if (nextChar == -1)
                {
                    tokenFinished = true;
                }
                else
                {
                    char ch = (char)nextChar;
                    if (char.IsWhiteSpace(ch))
                    {
                        if (!skipWhiteSpaceMode)
                        {
                            tokenFinished = true;
                            if (ch == '\r' && (Environment.NewLine == "\r\n"))
                            {
                                Console.Read();
                            }
                        }
                    }
                    else
                    {
                        skipWhiteSpaceMode = false;
                        tokenChars.Append(ch);
                    }
                }
            }

            string token = tokenChars.ToString();
            return token;
        }

        public static int NextInt()
        {
            string token = Cin.NextToken();
            return int.Parse(token);
        }
        public static long NextLong()
        {
            string token = Cin.NextToken();
            return long.Parse(token);
        }

        public static double NextDouble(bool acceptAnyDecimalSeparator = true)
        {
            string token = Cin.NextToken();
            if (acceptAnyDecimalSeparator)
            {
                token = token.Replace(',', '.');
                double result = double.Parse(token, CultureInfo.InvariantCulture);
                return result;
            }
            else
            {
                double result = double.Parse(token);
                return result;
            }
        }

        public static decimal NextDecimal(bool acceptAnyDecimalSeparator = true)
        {
            string token = Cin.NextToken();
            if (acceptAnyDecimalSeparator)
            {
                token = token.Replace(',', '.');
                decimal result = decimal.Parse(token, CultureInfo.InvariantCulture);
                return result;
            }
            else
            {
                decimal result = decimal.Parse(token);
                return result;
            }
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            long a = Cin.NextInt();
            long b = Cin.NextInt();
            Console.WriteLine(((a + b)/b)*b);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public void Solve()
    {
        int n = ReadInt();
        int m = ReadInt();
        Write(n + (m - n % m));
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #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(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}

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

namespace trenvk
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] nk = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            if (nk[0] % nk[1] == 0) Console.Write((nk[0] / nk[1] + 1) * nk[1]);
            else Console.Write(Math.Ceiling((double)nk[0] / nk[1]) * nk[1]);
        }
    }
}

using System;
using System.Collections.Generic;

namespace ConsoleApplication1 {
    class MainClass {
        public static void Main(string [] args) {
            string s = Convert.ToString(Console.ReadLine());
            string[] s2 = s.Split(' ');
            Int64 n = Convert.ToInt64(s2[0]);
            Int64 k = Convert.ToInt64(s2[1]);
            Console.Write(k + n / k * k);
        }
    }
}

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

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			try
			{
				Main main = new Main();
				main.ReadData();
				main.Process();
				main.WriteAnswer();
			}
			catch (Exception e)
			{
				Console.WriteLine(e);
			}
		}
	}

	class Main
	{
		private long _n;
		private long _k;
		private long _result;

		public void Process()
		{
			long x = (long)Math.Floor(_n / (decimal)_k);

			while (true)
			{
				if (x  * _k >  _n)
				{
					_result = x * _k;
					return;
				}
				x++;
			}
		}

		public void ReadData()
		{
			TextReader textReader = Console.In;
			//TextReader textReader = new StreamReader("input.txt");
			using (TextReader reader = textReader)
			{
				string readLine = reader.ReadLine();
				string[] strings1 = readLine.Split(' ');

				_n = int.Parse(strings1[0]);
				_k = long.Parse(strings1[1]);
			}
		}

		public void WriteAnswer()
		{
			using (TextWriter writer = Console.Out)
			{
				writer.WriteLine(_result);
			}
		}
	}
}

using System;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string[] res = input.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);
            int n = int.Parse(res[0]);
            int k = int.Parse(res[1]);
            int result = k*(n/k + 1);
            Console.WriteLine(result);

        }
    }
}

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

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string[] res = input.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);
            int n = int.Parse(res[0]);
            int k = int.Parse(res[1]);
            int result = k*(n/k + 1);
            Console.WriteLine(result);

        }
    }
}

using System;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string[] res = input.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);
            int n = int.Parse(res[0]);
            int k = int.Parse(res[1]);
            Console.WriteLine(k*(n/k + 1));

        }
    }
}

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

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] inp = Console.ReadLine().Split(' ');
            Int32 n = Int32.Parse(inp[0]);
            Int32 k = Int32.Parse(inp[1]);

            Int32 x = n + 1;

            if (x % k != 0)
            {
                x = (x / k + 1) * k;

            }

            Console.WriteLine(x);
        }
    }
}

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

namespace ConsoleApplication2
{
    class Program
    {

        static void Main(string[] args)
        {
            long[] n = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            Console.WriteLine((n[0] / n[1]) * n[1] + n[1]);
        }
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel.Design.Serialization;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Xml;

namespace codeforces
{
	class Program
	{
		public class User
		{
			public int c;

			public int r;
		}

		public class Point
		{
			public int x;

			public int y;
		}

		public class StringInt
		{
			public string x;

			public int y;
		}

		public class StringString
		{
			public string x;

			public string y;
		}

		public class IntInt
		{
			public int x;

			public int y;
		}

		public class SIComparer : IComparer<StringInt>
		{
			public int Compare(StringInt x, StringInt y)
			{
				return x.x.CompareTo(y.x);
			}
		}

		public class XComparer : IComparer<int>
		{
			public int Compare(int x, int y)
			{
				if (x % 10 > y % 10)
					return -1;
				return 1;
			}
		}

		public class Comparer : IComparer<User>
		{
			public int Compare(User x, User y)
			{
				if (x.c < y.c || (x.c == y.c && x.r < y.r))
					return -1;
				return 1;
			}
		}

		public static long getGcd(long a, long b)
		{
			if (b == 0)
				return a;
			return getGcd(b, a % 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 getString()
		{
			return Console.ReadLine();
		}

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

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

		public static int Min(int x, int y)
		{
			return Math.Min(x, y);
		}

		public static int Max(int x, int y)
		{
			return Math.Max(x, y);
		}

		public static int Abs(int x)
		{
			return Math.Abs(x);
		}

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

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

		public class Edge
		{
			public int v;

			public int w;
		}

		public class Vertex
		{
			public List<Edge> edges;

			public int ct;

			public bool was;
		}

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

		private static void Main(string[] args)
		{
/*			var input = new StreamReader("input.txt");
			var output = new StreamWriter("output.txt");*/
			var l = getLongList();
			var n = l[0];
			var k = l[1];
			Console.WriteLine((n / k + 1) * k);
			Console.ReadLine();
		}
	}
}

using System;
using System.Collections.Generic;

namespace ConsoleApplication13
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();

            int n = Int32.Parse(str.Split(' ')[0]);
            int k = Int32.Parse(str.Split(' ')[1]);

            int result = 0;

            int ostDel = n % k;

            int razn = k - ostDel;

            result = n + razn;

            Console.WriteLine(result);

        }
    }
}

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

namespace CodeForces
{
    class Program
    {

        static void Main(string[] args)
        {
            //Ввод-------------------------------------------------------------------
            string[] input = Console.ReadLine().Split(' ');
            int n = Int32.Parse(input[0]);
            int k = Int32.Parse(input[1]);

            int x = (int)n / k + 1;
            Console.WriteLine(x*k);

            //Console.ReadLine();
        }
    }
}

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

class Program
{
    private static long Sqrt3(long x)
    {
        long l = 1;
        long r = Math.Min(1000000, x);
        while (r - l > 1)
        {
            long mid = (l + r) / 2;
            long m3 = mid * mid * mid;
            if (m3 <= x)
                l = mid;
            else
                r = mid;
        }

        return l;
    }

    private static long div(long a, long b, long mod)
    {
        return (a * pow(b, mod - 2, mod)) % mod;
    }
    private static long pow(long a, long p, long mod)
    {
        long res = 1;
        while (p > 0)
        {
            if ((p & 1) == 1) res = (res * a) % mod;
            a = (a * a) % mod;
            p >>= 1;
        }
        return res;
    }

    static void Main(string[] args)
    {
        int n = ReadInt();
        int k = ReadInt();
        long x = (n + k) / k;
        x *= k;
        Console.WriteLine(x);
    }

    public class RSQ
    {
        private int[] m = new int[200001];
        public void Push(int pos, int v)
        {
            m[pos] += v;
        }

        public int Sum(int l, int r)
        {
            int ans = 0;
            while (l <= r) ans += m[l++];
            return ans;
        }
    }

    private static List<int>[] ReadGraph(int n, int m)
    {
        List<int>[] g = new List<int>[n + 1];
        for (int i = 0; i <= n; i++) g[i] = new List<int>();
        for (int i = 0; i < m; i++)
        {
            int a = ReadInt() - 1;
            int b = ReadInt() - 1;

            g[a].Add(b);
            g[b].Add(a);
        }

        return g;
    }

    private static int[,] ReadGraphAsMatrix(int n, int m)
    {
        int[,] matrix = new int[n + 1, n + 1];
        for (int i = 0; i < m; i++)
        {
            int a = ReadInt();
            int b = ReadInt();
            matrix[a, b] = matrix[b, a] = 1;
        }

        return matrix;
    }

    private static void Sort(ref int a, ref int b)
    {
        if (a > b) Swap(ref a, ref b);
    }

    private static void Swap(ref int a, ref int b)
    {
        int tmp = a;
        a = b;
        b = tmp;
    }

    private const int BufferSize = 1 << 12;
    private static StreamReader consoleReader;
    private static MemoryStream testData;

    private static int ReadInt()
    {
        int ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static ulong ReadULong()
    {
        ulong ans = 0;
        int chr;
        do
        {
            chr = consoleReader.Read();
            if (chr == -1)
                return 0;
        } while (chr < '0' || chr > '9');

        ans = (uint)(chr - '0');
        while (true)
        {
            chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans;
            ans = ans * 10 + (uint)(chr - '0');
        }
    }

    private static long ReadLong()
    {
        long ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static int[] ReadIntArray(int n)
    {
        int[] ans = new int[n];
        for (int i = 0; i < n; i++)
            ans[i] = ReadInt();
        return ans;
    }

    private static long[] ReadLongArray(int n)
    {
        long[] ans = new long[n];
        for (int i = 0; i < n; i++)
            ans[i] = ReadLong();
        return ans;
    }

    private static char[] ReadString()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        List<char> s = new List<char>();
        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s.ToArray();
    }

    private static char[] ReadString(int n)
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        char[] s = new char[n];
        int pos = 0;
        do
        {
            s[pos++] = (char)ans;
            if (pos == n) break;
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s;
    }

    private static char ReadLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))
                return (char)ans;
        }
    }

    private static char ReadDigit()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans >= '0' && ans <= '9')
                return (char)ans;
        }
    }

    private static int ReadDigitInt()
    {
        return ReadDigit() - (int)'0';
    }

    private static char ReadAnyChar()
    {
        return (char)consoleReader.Read();
    }

    private static string DoubleToString(double x)
    {
        return x.ToString(System.Globalization.CultureInfo.InvariantCulture);
    }

    static Program()
    {
        //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);
    }

    private static void PushTestData(string data)
    {
#if !ONLINE_JUDGE
        if (testData == null)
        {
            testData = new MemoryStream();
            consoleReader = new StreamReader(testData);
        }

        var pos = testData.Position;
        var bytes = Encoding.UTF8.GetBytes(data);
        testData.Write(bytes, 0, bytes.Length);
        testData.Flush();
        testData.Position = pos;
#endif
    }
}

using System;

namespace Temp
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputs = Console.ReadLine().Split();
            var n = int.Parse(inputs[0]);
            var k = int.Parse(inputs[1]);

            Console.WriteLine((n / k)*k + k);
        }
    }
}

using System;
public class Program
    {
        public static void Main(string[] args)
        {
            string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
            int n = int.Parse(input[0]);
            int k = int.Parse(input[1]);
            Console.WriteLine((n+k-n%k));
        }
    }

namespace _678A
{
    using System;

    public class Program
    {
        public static void Main(string[] args)
        {
            int[] paramsTask = Array.ConvertAll(Console.ReadLine().Split(' '), c => int.Parse(c));
            int n = paramsTask[0], k = paramsTask[1], round;

            round = (n / k) + 1;

            Console.WriteLine(k * round);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Olymp
{
  public class ProblemSolver
  {
    private Tokenizer input;

    public void Solve()
    {
      long n = input.NextLong();
      long k = input.NextLong();
      Console.Write((n / k + 1) * k);
    }

    public ProblemSolver(TextReader input)
    {
      this.input = new Tokenizer(input);
    }
  }

  #region Service classes

  public class Tokenizer
  {
    private TextReader reader;

    public int NextInt()
    {
      var c = SkipWS();
      if (c == -1)
        throw new EndOfStreamException();
      bool isNegative = false;
      if (c == '-' || c == '+')
      {
        isNegative = c == '-';
        c = this.reader.Read();
        if (c == -1)
          throw new InvalidOperationException();
      }
      if (!char.IsDigit((char)c))
        throw new InvalidOperationException();
      int result = (char)c - '0';
      c = this.reader.Read();
      while (c > 0 && !char.IsWhiteSpace((char)c))
      {
        if (!char.IsDigit((char)c))
          throw new InvalidOperationException();
        result = result * 10 + (char)c - '0';
        c = this.reader.Read();
      }
      if (isNegative)
        result = -result;
      return result;
    }

    public string ReadLine()
    {
      return reader.ReadLine();
    }

    public long NextLong()
    {
      return long.Parse(this.NextToken());
    }

    public double NextDouble()
    {
      return double.Parse(this.NextToken(), CultureInfo.InvariantCulture);
    }

    public int[] ReadIntArray(int n)
    {
      int[] a = new int[n];
      for (int i = 0; i < n; i++)
        a[i] = NextInt();
      return a;
    }

    public long[] ReadLongArray(int n)
    {
      long[] a = new long[n];
      for (int i = 0; i < n; i++)
        a[i] = NextLong();
      return a;
    }

    public double[] ReadDoubleArray(int n)
    {
      double[] a = new double[n];
      for (int i = 0; i < n; i++)
        a[i] = NextDouble();
      return a;
    }

    public string NextToken()
    {
      var c = SkipWS();
      if (c == -1)
        return null;
      var sb = new StringBuilder();
      while (c > 0 && !char.IsWhiteSpace((char)c))
      {
        sb.Append((char)c);
        c = this.reader.Read();
      }
      return sb.ToString();
    }

    private int SkipWS()
    {
      int c = this.reader.Read();
      if (c == -1)
        return c;
      while (c > 0 && char.IsWhiteSpace((char)c))
        c = this.reader.Read();
      return c;
    }

    public Tokenizer(TextReader reader)
    {
      this.reader = reader;
    }
  }

  class Program
  {
    public static void Main(string[] args)
    {
      var solver = new ProblemSolver(Console.In);
      solver.Solve();
    }
  }

  #endregion
}

/*
Johny likes numbers n and k very much. Now Johny wants to find the smallest integer x greater than n, so it is divisible by the number k.

Input
The only line contains two integers n and k (1 ≤ n, k ≤ 109).

Output
Print the smallest integer x > n, so it is divisible by the number k.
*/

using System;

namespace LuckyNunmbers {
    class Program {
        static void Main(string[] args) {
            var lines = Console.ReadLine().Split(' ');
            long n = long.Parse(lines[0]);
            long k = long.Parse(lines[1]);
            long times = (long)n / k;
            Console.WriteLine((k * times) + k);
        }
    }
}

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

namespace ConsoleApplication12
{
    class Program
    {
        static void Main(string[] args)
        {
            int x , y ,i=0,z=0;
            string[] tokens = Console.ReadLine().Split();
            x = int.Parse(tokens[0]);
            y = int.Parse(tokens[1]);
            z = x % y;
            i = y - z + x;
            Console.WriteLine(i);

        }
    }
}

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

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

            long x;

            if (n < k) x = k; else x = n + k - n % k;

            Console.Write(x);
        }
    }
}

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

namespace Johny_Likes_Numbers
{
    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)
        {
            int n = Next();
            int k = Next();

            long d = n/k;
            writer.WriteLine((d + 1)*k);

            writer.Flush();
        }

        private static int Next()
        {
            int c;
            int 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 _678A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            long n = long.Parse(input[0]), k = long.Parse(input[1]);
            long result = 0, ceil = (long)Math.Ceiling((decimal)n / k), floor = n / k;
            if (ceil == floor) result = (ceil + 1) * k;
            else result = ceil * k;
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Linq;

namespace Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            long[] count = Console.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
            Console.WriteLine((count[0]/count[1]+1)*count[1]);
        }
    }
}

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

namespace codeforces
//#17 Resolve Johny Likes Numbers
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] inputer = Console.ReadLine().Split();
            ulong input1 = ulong.Parse(inputer[0]),
                  input2 = ulong.Parse(inputer[1]);
            ulong newinput = input1%input2;
            input2 = input2 - newinput;

            Console.WriteLine(input2+input1);
            Console.ReadLine();
        }
    }
}

using System;

namespace CSharp
{
    public class _678A
    {
        public static void Main()
        {
            string[] tokens = Console.ReadLine().Split();

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

            Console.WriteLine(n - n % k + k);
        }
    }
}

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
class solution
{
    static void Main(string[] args)
    {
        string[] ab = Console.ReadLine().Split(' ');
        long n = Convert.ToInt64(ab[0]);
        long k = Convert.ToInt64(ab[1]);
        long div = n / k;
        long val = k*(div+1);
        Console.Write(val);
    }
}

using System;
using static System.Console;
class Solution
{
    static void Main(string[] args)
    {
        int[] a = Array.ConvertAll(ReadLine().Split(), int.Parse);
        WriteLine((a[0] / a[1] + 1) * a[1]);
    }
}

using System;
using System.Linq;
class Program
{
    static void Main()
    {
        var v = Console.ReadLine().Split(' ').Select(x=>Convert.ToInt32(x)).ToArray();
        Console.WriteLine((v[0] / v[1] + 1)*v[1]);
    }
}

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().Split(' ');
            Int64 a=Int64.Parse(s[0]);
            Int64 b=Int64.Parse(s[1]);
            //int c=a/b;
            Console.WriteLine((a/b+1)*b);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using System.Diagnostics;
using System.Numerics;
using static System.Console;
using static System.Convert;
using static System.Math;
using static Template;
using Pi = Pair<int, int>;

class Solver
{
    public void Solve(Scanner sc)
    {
        long N, K;
        sc.Make(out N, out K);
        Console.WriteLine((N + K) / K * K);
    }
}

#region Template
public static class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver().Solve(new Scanner());
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b) { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(this IList<T> A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }
    public static T[] Create<T>(int n, Func<T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }
    public static T[] Create<T>(int n, Func<int, T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }
    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> A) => A.OrderBy(v => Guid.NewGuid());
    public static int CompareTo<T>(this T[] A, T[] B, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }
    public static int MaxElement<T>(this IList<T> A, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }
    public static T PopBack<T>(this List<T> A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}
public class Scanner
{
    public string Str => Console.ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
    //public (T1, T2) Make<T1, T2>() { Make(out T1 v1, out T2 v2); return (v1, v2); }
    //public (T1, T2, T3) Make<T1, T2, T3>() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }
    //public (T1, T2, T3, T4) Make<T1, T2, T3, T4>() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }
}
public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1;
    public T2 v2;
    public Pair() { }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString() => $"{v1.ToString()} {v2.ToString()}";
    public void Deconstruct(out T1 a, out T2 b) { a = v1; b = v2; }
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3;
    public Pair() : base() { }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString() => $"{base.ToString()} {v3.ToString()}";
    public void Deconstruct(out T1 a, out T2 b, out T3 c) { Deconstruct(out a, out b); c = v3; }
}
#endregion

using System;
using static System.Console;

namespace CodeForces
{
    internal class Test1
    {
        private static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split();
            int n = int.Parse(input[0]);
            int k = int.Parse(input[1]);

            var rest = n % k;

            var res = n - rest + k;

            Console.WriteLine(res);

        }
    }
}

using System;
using System.Globalization;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;

namespace Codeforces
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;

        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }

        object Get()
        {
            checked
            {
                var n = ReadLongToken();
                var k = ReadLongToken();
                var rem = n % k;
                if (rem == 0)
                    return n + k;
                return n + k - rem;
            }
        }

        //object Get()
        //{
        //    checked
        //    {
        //        var n = ReadIntToken();
        //        var k = ReadIntToken();
        //        var table = new bool[n, n];
        //        for (int i = 0; i < n; i++)
        //        {
        //            var input = Read();
        //            for (int j = 0; j < n; j++)
        //                table[i, j] = input[j] == '.';
        //        }
        //        var cells = BFS(table);
        //    }
        //}
        //Cell[,] BFS(bool[,] input)
        //{
        //    var n = input.GetLength(0);
        //    var cells = new Cell[n, n];
        //    var visited = new bool[n, n];
        //    var componentIndex = 0;
        //    for (int i = 0; i < n; i++)
        //    {
        //        for (int j = 0; j < n; j++)
        //        {
        //            if (!visited[i, j] && input[i, j])
        //                BFS(i, j, cells, input, visited, componentIndex);
        //        }
        //    }
        //}

        //void BFS(int i, int j, Cell[,] cells, bool[,] input, bool[,] visited, int ccIndex)
        //{
        //    var n = input.GetLength(0);
        //    for
        //}

        struct Cell
        {
            int CCNumber { get; set; }
        }

        class Automata
        {
            bool[] terminals;
            public int sigma;
            public int len;
            public int[,] jumps;

            public void Create()
            {
                var a = ReadInts();
                len = a[0];
                sigma = a[2];
                var ts = ReadInts();
                terminals = new bool[len];
                for (int i = 0; i < ts.Length; i++)
                    terminals[ts[i]] = true;
                jumps = new int[len, sigma];
                for (int i = 0; i < len * sigma; i++)
                {
                    var b = Console.ReadLine().Split(' ');
                    jumps[Convert.ToInt32(b[0]), b[1][0] - 'a'] = Convert.ToInt32(b[2]);
                }
            }
            protected int[] ReadInts()
            {
                return Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
            }

            public bool IsTerminal(int s)
            {
                return terminals[s];
            }
        }
    }

    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        Queue<string> tokens;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (f == null)
                f = string.IsNullOrEmpty(FileName)
                    ? new StreamReader(Console.OpenStandardInput())
                    : new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName);
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return int.Parse(Read());
        }

        protected int ReadIntToken()
        {
            if (tokens == null || tokens.Count == 0)
                tokens = new Queue<string>(Read().Split(' '));
            return int.Parse(tokens.Dequeue());
        }

        protected int[] ReadInts()
        {
            var tokens = Read().Split(' ');
            var result = new int[tokens.Length];
            for (int i = 0; i < tokens.Length; i++)
                result[i] = int.Parse(tokens[i]);
            return result;
        }

        protected long ReadLongToken()
        {
            if (tokens == null || tokens.Count == 0)
                tokens = new Queue<string>(Read().Split(' '));
            return long.Parse(tokens.Dequeue());
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            var tokens = Read().Split(' ');
            var result = new long[tokens.Length];
            for (int i = 0; i < tokens.Length; i++)
                result[i] = long.Parse(tokens[i]);
            return result;
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName, r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {

            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func, T defaultValue = default(T))
        {
            T result = defaultValue;
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }

        public static string JoinStrings(this IEnumerable<int> source, string delimeter)
        {
            return source.Select(x => x.ToString()).JoinStrings(delimeter);
        }
    }
}

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

class MainClass
{
	public static void Main (string[] args)
	{
		string[] s = Console.ReadLine ().Split (' ');
		int n = int.Parse (s [0]);
		int k = int.Parse (s [1]);
		if((n+1)%k==0)
			Console.WriteLine (n+1);
		else
			Console.WriteLine (n + k - n % k);

		/*string[] s = Console.ReadLine ().Split (' ');
		int n = int.Parse (s [0]);
		int m = int.Parse (s [1]);
		s = Console.ReadLine ().Split (' ');
		Dictionary<char,int> cost = new Dictionary<char, int> ();
		cost.Add ('R', int.Parse (s [0]));
		cost.Add ('G', int.Parse (s [1]));
		cost.Add ('B', int.Parse (s [2]));
		cost.Add ('Y', int.Parse (s [3]));

		int start = 0, finish = 0;
		int[] A = new int[n * m];
		int[,] a = new int[n * m, n * m];
		for (int i = 0; i < n; i++) {
			string x = Console.ReadLine ();
			for (int j = 0; j < m; j++) {
				int root = i * m + j;
				if (x [j] == 'X')
					A [root] = -1;
				if (x [j] == 'S')
					start = i * m + j;
				if (x [j] == 'E')
					finish = i * m + j;
				if (x [j] != 'X' && x [j] != 'S' && x [j] != 'E' && x [j] != '.')
					A [root] = cost [x [j]];
			}
		}
		for (int u = 0; u < n * m; u++) {
			int x = u / m;
			int y = u - x * m;
			if (y + 1 < m) {
				if (A [u + 1] >= 0)
					a [u, u + 1] = A [u + 1];
				else
					a [u, u + 1] = -1;
			}
			if (y - 1 >= 0) {
				if (A [u - 1] >= 0)
					a [u, u - 1] = A [u - 1];
				else
					a [u, u - 1] = -1;
			}
			if (x + 1 < n) {
				if (A [u + m] >= 0)
					a [u, u + m] = A [u + m];
				else
					a [u, u + m] = -1;
			}
			if (x - 1 >= 0) {
				if (A [u - m] >= 0)
					a [u, u - m] = A [u - m];
				else
					a [u, u - m] = -1;
			}

		}
		int[] d = new int[n * m];
		bool[] used = new bool[n * m];
		int INF = (int)Math.Pow (10, 9);

		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++)
				d [i * m + j] = INF;
		d [start] = 0;

		for (int i = 0; i < n * m; i++) {
			int v = -1;
			for (int j = 0; j < n * m; j++)
				if (!used [j] && (v == -1 || d [j] < d [v]))
					v = j;
			if (d [v] == INF)
				break;
			used [v] = true;
			for (int j = 0; j < n * m; j++)
				if (a [v, j] >= 0 && d [v] + a [v, j] < d [j])
					d [j] = d [v] + a [v, j];
		}*/
	}
};

#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

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

namespace _13a
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
			Console.SetIn(getInput());
#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }
        }

        static void solution()
        {
            #region SOLUTION
            var d = readLongArray();
            var n = d[0];
            var k = d[1];

            var l = n / k + 1;
            Console.WriteLine(l * k);

            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

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

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

        static int[] readIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] readLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
		static StreamReader getInput()
		{
			var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
			var resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);

			return new StreamReader(resource);
		}
#endif
    }
}

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            string[] numbers = Console.ReadLine().Split();
            JohnyNumber(int.Parse(numbers[0]), int.Parse(numbers[1]));
        }

        private static void JohnyNumber(int n, int k)
        {
            int mult = 2;
            int i = k;
            while (i <= n || i % k != 0)
                i = k * mult++;
            Console.WriteLine(i);
        }
    }
}

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

namespace CF {
    class Program {
        static int n, k;

        static void solve()
        {
            var aux = Console.ReadLine().Split(' ');
            n = int.Parse(aux[0]);
            k = int.Parse(aux[1]);
            Console.WriteLine((n / k + 1) * k);
        }

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

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            int[] numbers = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            double n = numbers[0];
            double k = numbers[1];

            double res;
            if (n % k == 0)
                res = (n / k) + 1;
            else
                res = Math.Ceiling(n / k);

            res *= k;

            Console.WriteLine(res);
        }
    }
}

/* Date: 14.06.2016 * Time: 22:45 */
//

/*

A. ���� ����� �����
����������� �� ������� �� ����  0.5 ������
����������� �� ������ �� ����   256 ��������
����   ����������� ����
�����  ����������� �����
���� ����� ����� ����� n � k. ������ ���� ����� ����� ���������� ����� ����� x ������� n �����, ��� x ������� ������ �� ����� k.
������� ������
� ������������ ������ ��������� ���� ����� ����� n � k (1?<=?n,?k?<=?10^9).
�������� ������
�������� ���������� ����� ����� x?>?n, ��������� �� ����� k.
�������
������� ������
5 3
�������� ������
6
������� ������
25 13
�������� ������
26
������� ������
26 13
�������� ������
39

 */

using System;

class Example
{
	public static void Main(string[] args)
	{
		string [] ss = (Console.ReadLine ()).Split (' ');
		int n = int.Parse (ss [0]);
		int k = int.Parse (ss [1]);
		Int64 x;

		if ( n % k == 0 )
			x = n + k;
		else
			x = (n + k - 1) / k * k;

		Console.WriteLine (x);

		# if ( ! ONLINE_JUDGE )
			Console.ReadKey ();
		# endif
	}
}

using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var d = Console.ReadLine().Split(' ');
            var n = long.Parse(d[0]);
            var k = long.Parse(d[1]);

            Console.WriteLine(k * (n / k + 1));
        }
    }
}

using System;

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

            long n , k;
            string[] s = (Console.ReadLine()).Split(' ');
            n = long.Parse(s[0]);
            k = long.Parse(s[1]);

            n++;
            if (n % k == 0)
            {
                Console.WriteLine(n);
            }
            else
            {
                long a = (n / k) + 1;
                a = a * k;
                Console.WriteLine(a);
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml.Xsl;
using StringBuilder = System.Text.StringBuilder;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			var inputs1 = input1.Split(new[] {' ', '}', '{', ','}, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs3 = input3.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs4 = input4.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();

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

			long full = n / k;
			Console.WriteLine((full + 1) * k);
		}

		public class Team
		{
			public string Name { get; set; }

			public int Points { get; set; }

			public int GoalsFor { get; set; }

			public int GoalsAgainst { get; set; }
		}

		static long Factorial(long a)
		{
			return a > 1 ? a * Factorial(a - 1) : 1;
		}
	}
}

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

namespace ConsoleApplication2
{
    class Program
    {
        public long broj()
        {
            return Convert.ToInt64(Console.ReadLine());
        }
        public long[] niz()
        {
            string a = Console.ReadLine()+" ";
            int cnt = 0, curr = 0;
            for (int i = 0; i < a.Length; i++) if (a[i] == ' ') cnt++;
            long[] niz = new long[cnt];
            cnt = 0;
            for(int i=0;i<a.Length;i++)
            {
                if (a[i] == ' ')
                {
                    niz[cnt++] = curr;
                    curr = 0;
                }
                else curr = curr * 10 + a[i] - '0';
            }
            return niz;
        }
        static void Main(string[] args)
        {
            Program C = new ConsoleApplication2.Program();

            long[] a = C.niz();
            Console.WriteLine(a[1] * ((a[0]) / a[1] + 1));

        }
    }
}

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

namespace CF317
{
	internal class Program
	{
		private static void Main(string[] args)
		{
			var sr = new InputReader(Console.In);
			//var sr = new InputReader(new StreamReader("input.txt"));
			var task = new Task();
			using (var sw = Console.Out)
				//using (var sw = new StreamWriter("output.txt"))
			{
				task.Solve(sr, sw);
				//Console.ReadKey();
			}
		}
	}

	internal class Task
	{
		public void Solve(InputReader sr, TextWriter sw)
		{
			var input = sr.ReadArray(Int32.Parse);
			var n = input[0];
			var k = input[1];
			if (k == 1) {
				sw.WriteLine(n + 1);
			}
			else {
				var r = (n / k) + 1L;
				sw.WriteLine(r * k);
			}
		}
	}
}

internal class InputReader : IDisposable
{
	private bool isDispose;
	private readonly TextReader sr;

	public InputReader(TextReader stream)
	{
		sr = stream;
	}

	public void Dispose()
	{
		Dispose(true);
		GC.SuppressFinalize(this);
	}

	public string NextString()
	{
		var result = sr.ReadLine();
		return result;
	}

	public int NextInt32()
	{
		return Int32.Parse(NextString());
	}

	public long NextInt64()
	{
		return Int64.Parse(NextString());
	}

	public string[] NextSplitStrings()
	{
		return NextString()
			.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
	}

	public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
	{
		return NextSplitStrings()
			.Select(s => func(s, CultureInfo.InvariantCulture))
			.ToArray();
	}

	public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
	{
		return
			str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
				.Select(s => func(s, CultureInfo.InvariantCulture))
				.ToArray();
	}

	protected void Dispose(bool dispose)
	{
		if (!isDispose) {
			if (dispose)
				sr.Close();
			isDispose = true;
		}
	}

	~InputReader()
	{
		Dispose(false);
	}
}

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

namespace deneme
{
    class Program
    {
       static void Main(string[] args)
        {
           try
           {
                long[] nk = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
                long counter =0;
          //      Console.Write(nk[0]+" "+nk[1]);
                if (nk[1] > nk[0])
                    Console.Write(nk[1]);
                else if (nk[1] == nk[0])
                    Console.Write(nk[1]*2);
                else
                {
                    counter = nk[0] / nk[1]+1;
                    Console.Write(counter*nk[1]);
                }
                Console.ReadKey();
          }
         catch { }
        }
    }
}

using System;
using static System.Console;

namespace CodeForces
{
    internal class Test1
    {
        private static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split();
            int n = int.Parse(input[0]);
            int k = int.Parse(input[1]);

            for (int i = 2; ; i++)
            {
                int prod = k * i;
                if (prod > n)
                {
                    Console.WriteLine(prod);
                    break;
                }
            }
        }
    }
}

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            string[] numbers = Console.ReadLine().Split();
            JohnyNumber(int.Parse(numbers[0]), int.Parse(numbers[1]));
        }

        private static void JohnyNumber(int n, int k)
        {
            bool searching = true;
            int i = n + 1;

            if (k * 2 > n)
                i = k * 2;

            while (searching)
            {
                if (i % k == 0)
                {
                    searching = false;
                }
                else
                    i++;
            }
            Console.WriteLine(i);
        }
    }
}

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            string[] numbers = Console.ReadLine().Split();
            JohnyNumber(int.Parse(numbers[0]), int.Parse(numbers[1]));
        }

        private static void JohnyNumber(int n, int k)
        {
            int mult = 2;
            int i = n + 1;
            while(i < n || i % k != 0)
                i = k * mult++;
            Console.WriteLine(i);
        }
    }
}

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            string[] numbers = Console.ReadLine().Split();
            JohnyNumber(int.Parse(numbers[0]), int.Parse(numbers[1]));
        }

        private static void JohnyNumber(int n, int k)
        {
            int mult = 2;
            int i = n;
            while (i <= n || i % k != 0)
                i = k * mult++;
            Console.WriteLine(i);
        }
    }
}

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            int[] numbers = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            double n = numbers[0];
            double k = numbers[1];

            double res;
            if (n % k == 0)
            {
                res = (n / k) + 1;
            }
            else
            {
                res = Math.Ceiling(n / k);
                res *= k;
            }

            Console.WriteLine(res);
        }
    }
}

using System;

namespace CSharp
{
    internal static class Program
    {
        private static void Main(string[] args)
        {
            string[] numbers = Console.ReadLine().Split();
            JohnyNumber(int.Parse(numbers[0]), int.Parse(numbers[1]));
        }

        private static void JohnyNumber(int n, int k)
        {
            bool searching = true;
            int i = n;

            if (n > k && k * 2 > n)
                i = k * 2;

            while (searching)
            {
                if (i % k == 0)
                {
                    searching = false;
                }
                else
                    i++;
            }
            Console.WriteLine(i);
        }
    }
}

using System;

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

            long n , k;
            string[] s = (Console.ReadLine()).Split(' ');
            n = long.Parse(s[0]);
            k = long.Parse(s[1]);

            n++;
            if (n % k == 0)
            {
                Console.WriteLine(n);
                Console.WriteLine("OK");
            }
            else
            {
                long a = (n / k) + 1;
                a = a * k;
                Console.WriteLine(a);
            }

        }
    }
}

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

class MainClass
{
	public static void Main (string[] args)
	{
		string[] s = Console.ReadLine ().Split (' ');
		int n = int.Parse (s [0]);
		int k = int.Parse (s [1]);
		if((n+1)%k==0)
			Console.WriteLine (n);
		else
			Console.WriteLine (n + k - n % k);

		/*string[] s = Console.ReadLine ().Split (' ');
		int n = int.Parse (s [0]);
		int m = int.Parse (s [1]);
		s = Console.ReadLine ().Split (' ');
		Dictionary<char,int> cost = new Dictionary<char, int> ();
		cost.Add ('R', int.Parse (s [0]));
		cost.Add ('G', int.Parse (s [1]));
		cost.Add ('B', int.Parse (s [2]));
		cost.Add ('Y', int.Parse (s [3]));

		int start = 0, finish = 0;
		int[] A = new int[n * m];
		int[,] a = new int[n * m, n * m];
		for (int i = 0; i < n; i++) {
			string x = Console.ReadLine ();
			for (int j = 0; j < m; j++) {
				int root = i * m + j;
				if (x [j] == 'X')
					A [root] = -1;
				if (x [j] == 'S')
					start = i * m + j;
				if (x [j] == 'E')
					finish = i * m + j;
				if (x [j] != 'X' && x [j] != 'S' && x [j] != 'E' && x [j] != '.')
					A [root] = cost [x [j]];
			}
		}
		for (int u = 0; u < n * m; u++) {
			int x = u / m;
			int y = u - x * m;
			if (y + 1 < m) {
				if (A [u + 1] >= 0)
					a [u, u + 1] = A [u + 1];
				else
					a [u, u + 1] = -1;
			}
			if (y - 1 >= 0) {
				if (A [u - 1] >= 0)
					a [u, u - 1] = A [u - 1];
				else
					a [u, u - 1] = -1;
			}
			if (x + 1 < n) {
				if (A [u + m] >= 0)
					a [u, u + m] = A [u + m];
				else
					a [u, u + m] = -1;
			}
			if (x - 1 >= 0) {
				if (A [u - m] >= 0)
					a [u, u - m] = A [u - m];
				else
					a [u, u - m] = -1;
			}

		}
		int[] d = new int[n * m];
		bool[] used = new bool[n * m];
		int INF = (int)Math.Pow (10, 9);

		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++)
				d [i * m + j] = INF;
		d [start] = 0;

		for (int i = 0; i < n * m; i++) {
			int v = -1;
			for (int j = 0; j < n * m; j++)
				if (!used [j] && (v == -1 || d [j] < d [v]))
					v = j;
			if (d [v] == INF)
				break;
			used [v] = true;
			for (int j = 0; j < n * m; j++)
				if (a [v, j] >= 0 && d [v] + a [v, j] < d [j])
					d [j] = d [v] + a [v, j];
		}*/
	}
};

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

class MainClass
{
	public static void Main (string[] args)
	{
		string[] s = Console.ReadLine ().Split (' ');
		int n = int.Parse (s [0]);
		int k = int.Parse (s [1]);
		if(n%k==0)
			Console.WriteLine (n);
		else
			Console.WriteLine (n + k - n % k);

		/*string[] s = Console.ReadLine ().Split (' ');
		int n = int.Parse (s [0]);
		int m = int.Parse (s [1]);
		s = Console.ReadLine ().Split (' ');
		Dictionary<char,int> cost = new Dictionary<char, int> ();
		cost.Add ('R', int.Parse (s [0]));
		cost.Add ('G', int.Parse (s [1]));
		cost.Add ('B', int.Parse (s [2]));
		cost.Add ('Y', int.Parse (s [3]));

		int start = 0, finish = 0;
		int[] A = new int[n * m];
		int[,] a = new int[n * m, n * m];
		for (int i = 0; i < n; i++) {
			string x = Console.ReadLine ();
			for (int j = 0; j < m; j++) {
				int root = i * m + j;
				if (x [j] == 'X')
					A [root] = -1;
				if (x [j] == 'S')
					start = i * m + j;
				if (x [j] == 'E')
					finish = i * m + j;
				if (x [j] != 'X' && x [j] != 'S' && x [j] != 'E' && x [j] != '.')
					A [root] = cost [x [j]];
			}
		}
		for (int u = 0; u < n * m; u++) {
			int x = u / m;
			int y = u - x * m;
			if (y + 1 < m) {
				if (A [u + 1] >= 0)
					a [u, u + 1] = A [u + 1];
				else
					a [u, u + 1] = -1;
			}
			if (y - 1 >= 0) {
				if (A [u - 1] >= 0)
					a [u, u - 1] = A [u - 1];
				else
					a [u, u - 1] = -1;
			}
			if (x + 1 < n) {
				if (A [u + m] >= 0)
					a [u, u + m] = A [u + m];
				else
					a [u, u + m] = -1;
			}
			if (x - 1 >= 0) {
				if (A [u - m] >= 0)
					a [u, u - m] = A [u - m];
				else
					a [u, u - m] = -1;
			}

		}
		int[] d = new int[n * m];
		bool[] used = new bool[n * m];
		int INF = (int)Math.Pow (10, 9);

		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++)
				d [i * m + j] = INF;
		d [start] = 0;

		for (int i = 0; i < n * m; i++) {
			int v = -1;
			for (int j = 0; j < n * m; j++)
				if (!used [j] && (v == -1 || d [j] < d [v]))
					v = j;
			if (d [v] == INF)
				break;
			used [v] = true;
			for (int j = 0; j < n * m; j++)
				if (a [v, j] >= 0 && d [v] + a [v, j] < d [j])
					d [j] = d [v] + a [v, j];
		}*/
	}
};

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

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			try
			{
				Main main = new Main();
				main.ReadData();
				main.Process();
				main.WriteAnswer();
			}
			catch (Exception e)
			{
				Console.WriteLine(e);
			}
		}
	}

	class Main
	{
		private long _n;
		private long _k;
		private long _result;

		public void Process()
		{
			long x = (long)Math.Floor(_n / (decimal)_k) * _k + 1;

			while (true)
			{
				if (x%_k == 0)
				{
					_result = x;
					return;
				}
				x++;
			}
		}

		public void ReadData()
		{
			//TextReader textReader = Console.In;
			TextReader textReader = new StreamReader("input.txt");
			using (TextReader reader = textReader)
			{
				string readLine = reader.ReadLine();
				string[] strings1 = readLine.Split(' ');

				_n = int.Parse(strings1[0]);
				_k = long.Parse(strings1[1]);
			}
		}

		public void WriteAnswer()
		{
			using (TextWriter writer = Console.Out)
			{
				writer.WriteLine(_result);
			}
		}
	}
}