#K93897. Reversed Sequence Position Finder
Reversed Sequence Position Finder
Reversed Sequence Position Finder
You are given two positive integers (n) and (k). Consider the sequence of integers from 1 to (n) in increasing order, i.e. (1, 2, \ldots, n). When this sequence is reversed, it becomes (n, n-1, \ldots, 1). Your task is to determine the number at the (k)th position in the reversed sequence. This can be computed directly using the formula: [ \text{ans} = n - k + 1 ] Make sure to read the input from standard input (stdin) and write the output to standard output (stdout).
inputFormat
The input consists of a single line containing two space-separated integers (n) and (k) (where (1 \leq k \leq n)).
outputFormat
Output a single integer representing the number at the (k)th position in the reversed sequence.## sample
7 2
6