-
Notifications
You must be signed in to change notification settings - Fork 0
/
r2.java
27 lines (21 loc) · 714 Bytes
/
r2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package r2;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
class r2 {
private void run() throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter w = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer s = new StringTokenizer(r.readLine());
int a = Integer.parseInt(s.nextToken());
int b = Integer.parseInt(s.nextToken());
w.write((2 * b) - a + "");
w.flush();
}
public static void main(String[] a) throws IOException {
(new r2()).run();
}
}